Setting Catalog Connection throws an exception

I exposed the document library in my team site as catalog, and enabled the anonymous access. On our publishing site collection when I tried to set up the catalog connection, I got "Specified argument was out of the range of valid values. Parameter name:
index" error, and I couldn't create the connection. I have done catalog connection many times, but nenver run into this error before.
Can you please  tell me what is going wrong?   Here is the error I found in the log file: "CatalogSourcePage.OnLoad; Unknown Exception: Specified argument was out of the range of valid values. Parameter name: index 2ef0739c-c879-b0c0-80af-6fb18ea733cd"
Thank you very much!
Albert
Newbie to SharePoint.

Hi Albert,
According to your description, my understanding is that you got an error when you enabled a library as a category.
How did you do for your process?
Please check your process as the links:
http://blogs.technet.com/b/tothesharepoint/archive/2013/02/28/stage-3-how-to-enable-a-list-as-a-catalog.aspx
http://technet.microsoft.com/library/jj656774.aspx#BKMK_Share_library_list_as_catalog
I hope this helps.
Thanks,
Wendy
Wendy Li
TechNet Community Support

Similar Messages

  • B1DiEventService:  ERROR :Connect throw an exception: Host is unknown

    Hi,
    I tried to create an event service. I followed the example of VB code. When I try to connect to the service using following code:
    Function Connect() As Boolean
            Try
                ' Create an instance of B1DIEventsService, Company object as parameter
                evtService = New B1DIEventsService.B1DIEventsService(oCompany)
                'Connect to the service
                evtService.Connect(New B1DIEventsService.B1DIEventsConnectionLostDelegate(AddressOf OnServerShutdown))
                Return True
            Catch ex As B1DIEventsService.B1DIEventsException
                SBO_Application.MessageBox("EVENT_ERROR :" + ex.Message)
            Catch ex As Exception
                SBO_Application.MessageBox("ALG_ERROR :" + ex.Message)
            End Try
            Return False
        End Function
    I get the message EVENT_ERROR :Connect throw an exception. Host is unknown
    I'm using the examples for 2005 SP01 private connections.
    Logfile shows following info:
    TIME;LEVEL;INFO;
    31-5-2007 15:22:26;INFOPLUS;TraceLevel: Warning
    31-5-2007 15:22:26;INFOPLUS;PortNumber: 4334
    31-5-2007 15:22:26;INFOPLUS;KeepAlivePeriod: 2000000
    31-5-2007 15:22:26;INFOPLUS;KeepAliveMax: 12000000
    31-5-2007 15:22:26;INFOPLUS;MaxSizeAction: Replace
    31-5-2007 15:22:26;INFOPLUS;MaxFileSize: 6000000
    31-5-2007 15:22:28;INFOPLUS;Connect to server.
    31-5-2007 15:22:29;INFOPLUS;Client: Reference to server acquired
    31-5-2007 15:22:34;ERROR;Connect throw an exception: <u>Host is onbekend</u>
    The last part (underlined) is dutch and means "Host is unknown."
    Can anyone help please?
    Thanks and Regards,
    Sander

    Hi Sander,
    It seems like the name or adress of the server is unknown for the machine, it cannot connect to it or the server is not running.
    Is your oCompany object initialized and connected to the DI API before creating the B1DIEventsService?
    Have you tried to run client and server side in the same machine to do a small test?
    The problem is at the .NET Remoting interface, it cannot connect to it.
    Regards
    Trinidad.

  • GetWarnings on Connection throws exception if rollback = true

    I am trying to use hibernate within WLS 7SP4 and I get an exception everytime it
    tries to close an exception.
    inside
    weblogic.jdbc.jts.Connection.getWarnings()
    the first thing it does is call the method
    checkIfRoleBack(). This essentially throws an exception if the Transaction is
    currently in a roleback state
    If you look at the java API for get warnings it says it should only throw an exception
    if a database access error occurs. However a transaction being in a roleback state
    is not exactly a database error it is a perfectly valid state.
    THe problem I have is that when Hibernate tries to close a connection it also
    tries to log all the warnings on the connection. This means that closing a rolledback
    connection always throws an exception.
    Is this a bug in the weblogic implementation of Connection or is this expected
    beahviour.

    In that case we will be fine and the change is not that important
    Thanks
    Carl
    Joe Weinstein <[email protected]> wrote:
    >
    >
    Carl wrote:
    If the tx times out will I still be able to use sessionContext.getRollBackOnly()
    or will this only work if manually set.That should certainly still work. It is only JDBC that is prevented after
    the
    tx is done.
    Joe
    Thanks
    Carl
    Joe Weinstein <[email protected]> wrote:
    Carl Marais wrote:
    Thanks Joe for the response.
    My current solution is just to log and consume the exceptions if doinga close
    when the SessionContext of the EJB is set to Rollback. Judging fromwhat you are
    saying this should not have any impact on overall processing and theoriginal
    business exception can still flow through to the clientCorrect. The exception from getWarnings() has no effect on any processing
    and
    can be ignored if it's meaning is understood. We will currently allow
    no jdbc
    to be done, as soon as the tx is done for any reason. This could occur
    at any
    time, if for instance the tx reached it's timeout limit in-flight.
    Let me know how important the change I suggested is, or whether
    you're
    OK
    as-is for now with the above explained.
    thanks,
    Joe
    Joe Weinstein <[email protected]> wrote:
    Carl Marais wrote:
    I am trying to use hibernate within WLS 7SP4 and I get an exceptioneverytime it
    tries to close an exception.
    inside
    weblogic.jdbc.jts.Connection.getWarnings()
    the first thing it does is call the method
    checkIfRoleBack(). This essentially throws an exception if the Transactionis
    currently in a roleback state
    If you look at the java API for get warnings it says it should onlythrow an exception
    if a database access error occurs. However a transaction being in
    a
    roleback state
    is not exactly a database error it is a perfectly valid state.
    THe problem I have is that when Hibernate tries to close a connectionit also
    tries to log all the warnings on the connection. This means that
    closing
    a rolledback
    connection always throws an exception.
    Is this a bug in the weblogic implementation of Connection or is
    this
    expected
    beahviour.Hi. I can see it's being unexpected, but we must do all we can toensure
    that
    application code does no JDBC (which for the most part is intendedto
    contribute
    to the transaction) when the transaction is not in an accepting state.
    For maximum
    concurrency we actually reclaim the underlying pooled connection
    as
    soon
    as the
    fate of the transaction is sealed. This means that the warnings itmay
    have accrued
    are no longer accessible to the client. This is because we turn offthe
    wrapper
    object that the client has (generating that exception), and for pool
    cleanliness
    we always clear any warnings the connection may have collected during

  • DNS Set Up system throw as ORA-12154; TNS :could not resolve the connect id

    Hi,
    While i'm creating DNS set up system throws below message
    unable to connect
    SQLState=08004
    DNS Set Up for instantclient(win32-10.2.0.4) system throw as ORA-12154; TNS :could not resolve the connect identified specified.
    operationg system:xp
    dir path:C:\Oracle\instantclient10_2
    TNSNAMES.ORA(C:\Oracle\instantclient10_2\NetWork\ADMIN) Contants
    YourTNSName =sankar
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST =localhost)(PORT =1521))
    (CONNECT_DATA =
    (SID =sankar)
    (SERVER = DEDICATED)
    dir contains:
    sqresus.dll,
    sqresja.dll
    sqoras32.dll
    sqora32.dll
    oraociei10.dll
    oraocci10.dll
    orannzsbb10.dll
    ojdbc14.jar
    ocijdbc10.dll
    ociw32.dll
    oci.dll
    classes12.jar

    user7197586 wrote:
    Hi
    I have been created one DBLink it's created but when i am trying to access the data through the link it's raise error as
    "ORA-12154: TNS:could not resolve the connect identifier specified"
    CREATE
    PUBLIC DATABASE LINK
    Vrd_tcplink
    CONNECT TO
    "SAPVRD"
    IDENTIFIED BY
    "manager123"
    USING
    'VRD_TCP.WORLD'
    created this above dblink
    Kindly Suggest to wau out.
    Regards,
    Sachin
    When using a dblink, the database with the link is acting as a client to the remote database ... exactly like sqlplus running on the db server.
    read: http://edstevensdba.wordpress.com/2011/02/26/ora-12154tns-03505/ ora-12154tns-03505

  • 2 connections, either one can throw an exception

    In my application I have 2 connections open to the different DBs at the same time. Either operation ( select/update etc ) can throw an exception. I don't want to embrace every SQL statement with the different "try ... catch" block, because it will be too messy. Is there any way to determine what connection threw an exception.
    Sample :
    try{
    Connection conn1 = ...
    Connection conn2 = ...
    PreparedStatement ps1 = conn1.getPreparedStatement(...);
    PreparedStatement ps2 = conn2.getPreparedStatement(...);
    ps1.executeQuery(qstring1);
    ps2.executeQuery(qstring2);
    catch ( SQLException ex){
    // Can I put some logic here which will tell me whether the problem related to conn1 or conn2 ?
    System.out.println("Exception : " + ex);
    }

    vs777 wrote:
    I have a "global" DB instance where my metadata and instance-specific data resides ( domestice data ). I also have "secondary" DB instance with ( foreign data ) to which I might connect at the run-time if the application logic requires. I am updating metadata Sounds like you want to do "change data capture". If that's the case, I'd recommend looking into your database vendor's capabilities rather than doing this in Java. I'd also look into database links and triggers if your database supports them. Sounds like you're doing something that's best left to the database, not your application. It could be done behind the scenes. It sounds like more of a pure database play rather than business logic.
    throughout the application "metadata"? What does that word mean to you? Please explain.
    So you're changing the schema dynamically? Metadata means describing the tables and columns. That's changing as the app runs? Sounds confusing.
    as well as retrieve and update data in one of the instances depending on conditions, so it's really inconvinient for me to wrap every SQL statement ( execute/select/delete method ) with "try ... catch" block.Inconvenient, but necessary. Somebody has to handle exceptions.
    Sounds like you need to think about a way to not repeat code.
    I have an application up-and-running for several months already and "2 DB instances" requirement came up just recently, so I am not planning to redesign an application but to handle SQL exceptions properly.So what do you want here? What are you asking if you're not willing to redesign anything?
    You're probably not even aware of two phase commit. What happens to your app if the insert of the data succeeds but the metadata does not? Ooops, out of synch. Do you roll back manually? How does the app alert you to the need to do so?
    %

  • NCo throws an Exception calling BAPI_MATERIAL_SAVEDATA?

    I've been successful in calling BAPIs from NCo (BAPI_CHARACT_CREATE, BAPI_CLASS_CREATE, BAPI_VENDOR_FIND, BAPI_VENDOR_GETDETAIL)....
    However when calling BAPI_MATERIAL_SAVEDATA, I always get the following Exception being thrown:
    Index was outside the bounds of the array.
       at SAP.Connector.Rfc.RfcStructureUtil.ToRfcStructure(Object obj, Byte[] dest, Type t, Encoding encoding, Boolean isUnicode, PropertyInfo[] propinfos, RfcStructInfo structInfo)
       at SAP.Connector.Rfc.RfcStructureUtil.GetITabFromList(SAPConnection conn, Object list, Type t, RfcStructInfo structInfo, Int32 itab)
       at SAP.Connector.Rfc.RfcClient.PrepareClientParameters(Type classType, MethodInfo m, Boolean isTQRfc, Object[] MethodParamsIn, RFC_PARAMETER[]& paramsIn, RFC_PARAMETER[]& paramsOut, RFC_TABLE[]& tables, ParameterMap[]& paramMaps)
       at SAP.Connector.Rfc.RfcClient.RfcInvoke(SAPClient proxy, String method, Object[] methodParamsIn)
       at SAP.Connector.SAPClient.SAPInvoke(String method, Object[] methodParamsIn)
       at SAP_MM_Test.SAPProxy1.Bapi_Material_Savedata(BAPI_MARA Clientdata, BAPI_MARAX Clientdatax, String Flag_Cad_Call, String Flag_Online, BAPI_MPOP Forecastparameters, BAPI_MPOPX Forecastparametersx, BAPIMATHEAD Headdata, String No_Dequeue, String No_Rollback_Work, BAPI_MPGD Planningdata, BAPI_MPGDX Planningdatax, BAPI_MARC Plantdata, BAPI_MARCX Plantdatax, BAPI_MVKE Salesdata, BAPI_MVKEX Salesdatax, BAPI_MARD Storagelocationdata, BAPI_MARDX Storagelocationdatax, BAPI_MLGT Storagetypedata, BAPI_MLGTX Storagetypedatax, BAPI_MBEW Valuationdata, BAPI_MBEWX Valuationdatax, BAPI_MLGN Warehousenumberdata, BAPI_MLGNX Warehousenumberdatax, BAPIRET2& Return0, BAPIPAREXTable& Extensionin, BAPIPAREXXTable& Extensioninx, BAPI_MEANTable& Internationalartnos, BAPI_MAKTTable& Materialdescription, BAPI_MLTXTable& Materiallongtext, BAPI_MFHMTable& Prtdata, BAPI_MFHMXTable& Prtdatax, BAPI_MATRETURN2Table& Returnmessages, BAPI_MLANTable& Taxclassifications, BAPI_MARMTable& Unitsofmeasure, BAPI_MARMXTable& Unitsofmeasurex) in C:\Dev\SAP_MM_Test\SAPProxy1.vb:line 220
       at SAP_MM_Test.Form1.Button1_Click(Object sender, EventArgs e) in C:\Dev\SAP_MM_Test\Form1.vb:line 114"     String
    I even tried calling the Method with all parameters set to Nothing and also get the same error.  I tested some of the other BAPI I listed will all Nothing parameters and it does not throw any exceptions.  Almost seems as if the Proxy generated classes did not get created properly or something?
    Has anyone else successfully called BAPI_MATERIAL_SAVEDATA from NCo 2.0?
    PS...I was successful in calling the BAPI from SE37 with the exact same data, therefore I know I have all the mandatory parameters specified (HeadData, ClientData, ClientDatax...etc)
    Anything obvious in the following code?:
    =======================================
         ' Connection String
         Dim cs As String = "ASHOST=10.83.180.239 SYSNR=10 CLIENT=110 USER=CMCHUG2 PASSWD=********"
         ' construct the proxy with connection string
         Dim proxy As New SAPProxy1(cs)
         ' Header Data
         Dim HeadData As New BAPIMATHEAD
         HeadData.Material = "000000000000000754"            ' Material NUmber (PAD to 18)
         HeadData.Ind_Sector = "U"                           ' Industry Sector
         HeadData.Matl_Type = "ERSA"                         ' Material Type (ERSA=Space Parts / HERS=Manufacturer Part)
         HeadData.Basic_View = "X"                           ' Need at least 1 view
         ' Client Data
         Dim ClientData As New BAPI_MARA
         ClientData.Matl_Group = "01"                        ' Material Group
         ClientData.Base_Uom = "EA"                          ' Base Unit of Measure
         ' Set the ClientData Indicator Table
         Dim ClientDataX As New BAPI_MARAX
         ClientDataX.Matl_Group = "X"
         ClientDataX.Base_Uom = "X"
         ' Short Description (TABLE)
         Dim ShortDesc As New BAPI_MAKTTable
         Dim sDescr As New BAPI_MAKT
         sDescr.Langu = "E"                                  ' Language
         sDescr.Matl_Desc = "Short Desc Test"               ' Short Description (Max 40)
         ShortDesc.Add(sDescr)
         Dim tblRet As New BAPIRET2
         Dim tblRetMsg As New BAPI_MATRETURN2Table
         proxy.Bapi_Material_Savedata(ClientData, ClientDataX, Nothing, Nothing, Nothing, Nothing, HeadData, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, tblRet, Nothing, Nothing, Nothing, ShortDesc, Nothing, Nothing, Nothing, tblRetMsg, Nothing, Nothing, Nothing)
    Exception Thrown Here!!!

    Reiner,
    Tried what you suggested, still get the same results.  This the 3rd development system I try this from. In all cases I generated proxies via drop and drop of the SaveData Method under StandardMaterial (BOR).  Since it was just generated the MetaData should be up to date?, good suggestion thought, I could see where that might be a problem going against different backends.
    My lastest attempt (I am quickly running out of ideas), was to generate a Standalone Proxy containing the SaveData method.  Same Results :{ 
    I was able to create Standalone Proxies for the other Business Objects I'm using (Characteristics, Class..etc) without a hitch. (Except for "Class", complaining about the Class name generated (Public Class Class...so I renamed to sapClass).  Using the Standalone Proxy Class I might try from Visual Studio 2005 to see if I get the same results.
    Also encountered another problem when trying to Add the whole BOR object StandardMaterial to the Proxy (so I would have access to a few of the Methods....this failed with some Java out of memory error....I would have to attempt this again to capture the exact error....when I get time I'll put that in another post).

  • Office 365 Sandbox Solution EventReceiver throwing Remote Exception in ItemAdding

    Hi,
    I created a sandbox webpart for O365 with EventReceivers with ItemAdding for Document Library and while i upload a document to library in O365  sharepoint site application throws below exception:-
    System.Runtime.Remoting.RemotingException: Server encountered an internal error. For more information, turn off customErrors in the server's .config file.
    Server stack trace: 
    Exception rethrown at [0]: 
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at Microsoft.SharePoint.Administration.ISPUserCodeExecutionHostProxy.Execute(Type us
    Same code works perfectly on my Development machine, Please help. Below is the Code
    base.EventFiringEnabled = false;
    bool isFile = (properties.AfterProperties["vti_filesize"] != null);
    if (isFile == true)                   
    SPWeb currentWeb = properties.OpenWeb();
    // Get foldername from url like Document/EC10001/filename.txt                       
    string folderName = properties.AfterUrl.Split(new char[] { '/' })[1];
    SPList spList = currentWeb.Lists[properties.List.ID];                       
    SPQuery spQuery = new SPQuery();                       
    spQuery.Query = "<OrderBy><FieldRef Name='Modified' Ascending='FALSE'/></OrderBy>";
    //Getting the folder object from the list                       
    SPFolder folder = spList.RootFolder.SubFolders[folderName];
    //Set the Folder property                       
    spQuery.Folder = folder;
    int fileSequenceId = 0;                      
    SPListItemCollection items = spList.GetItems(spQuery);
    if (items.Count > 0)                       
    string documentID = items[0]["DocumentID"] != null ? items[0]["DocumentID"].ToString() : string.Empty;
    if (!string.IsNullOrEmpty(documentID))                           
    string splitNumber = documentID.Split(new char[] { '-' })[1];                               
    fileSequenceId = Convert.ToInt32(splitNumber) + 1;                           
    else                           
    properties.ErrorMessage = "Unable to generate Document Id";                               
    properties.Cancel = true;                           
    else                       
    fileSequenceId = 1;                       
    // Set DocumentID like EC10001-001                       
    properties.AfterProperties["DocumentID"] = folderName + "-" + fileSequenceId.ToString(ConstantsList(currentWeb, "DocumentID"));      
    // Retrive "EEC000" string from Constant List               
    properties.AfterProperties["vti_title"] = folderName + "-" + fileSequenceId.ToString(ConstantsList(currentWeb, "DocumentID"));   
    // Retrive "EEC000" string from Constant List                
    base.EventFiringEnabled = true;
    Thanks,
    Pranay Chandra Sapa

    Hi,
    According to your description, my understanding is that when you upload document in Office 365 site, the event receiver in sandbox solution throws error.
    Per my knowledge, if you want to use event receiver in Office 365 environment, you need to use remote event receiver instead the normal event receiver in an app.
    Here are some detailed articles for your reference:
    Create a remote event receiver in apps for SharePoint
    Handle events in apps for SharePoint
    Thanks
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Throwing an exception from XSLT

    Just wanted to share a finding with the Oracle XDB community and possibly suggest an enhancement to the xdb product development team (care of MDRAKE).
    I had a scenario where I wanted to throw an exception from the XSLT.
    A little Googling revealed this helpful post:
    http://weblogs.asp.net/george_v_reilly/archive/2006/03/01/439402.aspx
    ...so I gave it a shot.
    In my XSLT, I have a <xsl:choose> block with the following <xsl:otherwise> block:
    <xsl:otherwise>
        <xsl:message terminate="yes">Unknown Document Type</xsl:message>                          
    </xsl:otherwise>I used a stub test to run this through, giving it a file which would exercise the exception:
    select xmltype(bfilename('XML_RESOURCES', 'data.xml'),0).transform(xmltype(bfilename('XML_RESOURCES', 'sanitize_xml.dev.xsl'),0))
    from dual;..and to my 'joy', I did get an exception:
    ORA-30998: transformation error: execution of compiled XSLT on XML DOM failedHmm...would of been nicer to get something like what Eclipse/Xalan pops out:
    file:/H:/eclipse_indigo_workspace/XSLT/sanitize_xml.xsl; Line #28; Column #59; Unknown Document Type
    (Location of error unknown)Stylesheet directed termination...i.e. my custom error message "Unknown Document Type" isn't output by Oracle.
    Just to be safe, I tried a file which would NOT exercise this xsl:otherwise block and it did run through OK.
    So, could XDB report a better error?
    Thoughts?

    SQL> VAR XSL VARCHAR2(4000)
    SQL> --
    SQL> begin
      2    :XSL :=
      3  '<?xml version="1.0" encoding="UTF-8"?>
      4  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      5     <xsl:output method="xml" indent="yes"/>
      6     <xsl:template match="/">
      7             <Result>
      8                     <xsl:choose>
      9                             <xsl:when test="Input=''1''">
    10                                     <Output>1</Output>
    11                             </xsl:when>
    12                             <xsl:when test="Input=''2''">
    13                                     <xsl:message>The value is 2</xsl:message>
    14                                     <Output>2</Output>
    15                             </xsl:when>
    16                             <xsl:when test="Input=''3''">
    17                                     <xsl:message terminate="no">The value is 3</xsl:message>
    18                                     <Output>3</Output>
    19                             </xsl:when>
    20                             <xsl:otherwise>
    21                                     <xsl:message terminate="yes">Invalid value</xsl:message>
    22                                     <Output>Bad Input</Output>
    23                             </xsl:otherwise>
    24                     </xsl:choose>
    25             </Result>
    26     </xsl:template>
    27  </xsl:stylesheet>';
    28  end;
    29  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.00
    SQL> select XMLTRANSFORM(XMLTYPE('<Input>1</Input>'),XMLTYPE(:XSL))
      2    from dual
      3  /
    <?xml version="1.0" encoding="WINDOWS-1252"?>
    <Result>
      <Output>1</Output>
    </Re
    Elapsed: 00:00:00.01
    SQL> select XMLTRANSFORM(XMLTYPE('<Input>2</Input>'),XMLTYPE(:XSL))
      2    from dual
      3  /
    <?xml version="1.0" encoding="WINDOWS-1252"?>
    <Result>
      <Output>2</Output>
    </Re
    Elapsed: 00:00:00.00
    SQL> select XMLTRANSFORM(XMLTYPE('<Input>3</Input>'),XMLTYPE(:XSL))
      2    from dual
      3  /
    <?xml version="1.0" encoding="WINDOWS-1252"?>
    <Result>
      <Output>3</Output>
    </Re
    Elapsed: 00:00:00.01
    SQL> select XMLTRANSFORM(XMLTYPE('<Input>4</Input>'),XMLTYPE(:XSL))
      2    from dual
      3  /
    ERROR:
    ORA-30998: transformation error: execution of compiled XSLT on XML DOM failed
    no rows selected
    Elapsed: 00:00:00.01
    SQL>
    SQL>The actuall error is not unreasonalbe. The Execution did fail beacuse you terminated it.. Contacting Oralce Support may be a little excessive...
    Now with respect to message the question is where...
    We 'could' output into the same buffer as is used by DBMS_OUTPUT, but that has limits in terms of the amount of output that can be generated.
    We could write it to the trace file, but that may be difficulat for a developer to get to
    We could write it to a log file in the XDB repository, but where and how to name it...
    We could another parameter to XMLTransform, which would be a Message Buffer
    All of these are in effect enhancements..
    BTW I checked with XML Spy and they seem to ignore message too, so I'm wondering how widely used this is...
    We cannot add it to the output of the XSL since XMLTransform defines the output of the XML to be well formed XML, and adding a random set of text nodes would viloate that rule..

  • JNI Application running in ms-dos but throws an exception in applet

    Hi! I have a java application which calls a DLL using the JNI. This works perfect if I execute the java program from my command line (in ms-dos) But when I try to do it in an applet, it indeed runs and do everything ok, but at the end of the execution I get a EXECUTION_EXCEPTION.
    This is how is working:
    1.- jnidllmyclass, this is where I call the native method of my DLL
    2.- intermediate DLL which writes to files to c:\temporal and it calls several functions from other DLL
    3.- other DLL which writes more files (among other things)
    4.- applet class with a call to jnidllmyclass
    Now the DLL what does is to open a connection to a usb scanner, then send commands to it to scann somethings, save front and back images to c:\temporal (obviously, all of this is done in the user system, using certificates) and write other file and close the connection. This works! it write the images well and write everything... but after that the exception arises... I have doubt of what is it, because if it does all, what is causing the exception?
    Thanks for your help!

    Hi! Applet can access the DLL. The scanners works, but the C DLL throws an exception. Nevertheless, I've managed to see what was going on. When you click a JButton in a GUI, it enters only one to the actionlistener, but if this is done in an Applet, enters twice, so... the first time worked fine, but the second no because there was nothing to scann.
    This theme is a bit creepy, if you want help just ask! I give snippets, not just advices... I hate those people, so fell free to ask.
    Greetings!

  • Application call to ODBC SQLSetEnvAttr function throw HY011 exception

    Hi All,
          I try to use odbc driver manager in my .Net Application.first My .Net runtime is 3.5, odbc function calls(unmanaged functions are  imported to .Net application by dllimport attribute)can work well.but when .Net runtime is upgraded
    to 4.0,SetEnvAttr function calls
    return SQL-ERROR and I call SQLGetDiagRec function  get this error information:Operation invalid at this time.sqlstate value is HY011.
    below is my code fragment:
    [DllImport("odbc32.dll")]
    extern static short SQLSetEnvAttr(
    IntPtr envHandle,
    ushort attribute,
    IntPtr attrValue,
    int stringLength);
    [DllImport("odbc32.dll")]
    extern static short SQLAllocHandle(
    ushort HandleType,
    int InputHandle,
    out IntPtr OutputHandle);
    try
    rc = SQLAllocHandle(SQL_HANDLE_ENV, 0, out sql_env_handle);
    if ((rc != SQL_SUCCESS) && (rc != SQL_SUCCESS_WITH_INFO))
    throw new Exception("SQLAllocHandle: failed to allocate SQL_HANDLE_ENV");
    rc = SQLSetEnvAttr(sql_env_handle, SQL_ATTR_ODBC_VERSION, (IntPtr)SQL_OV_ODBC3, 0);
    //if ((rc != SQL_SUCCESS) && (rc != SQL_SUCCESS_WITH_INFO))
    // throw new Exception("SQLSetEnvAttr: failed to set SQL_ATTR_ODBC_VERSION");
    if((rc == SQL_SUCCESS_WITH_INFO)||(rc == SQL_ERROR))
    short i=1;
    short rc2;
    StringBuilder sqlstate=new StringBuilder();
    int NativeErrorPtr=0;
    StringBuilder MessageText=new StringBuilder();
    short BufferLength=256;
    short TextLengthPtr=0;
    while ((rc2 = SQLGetDiagRec((short)SQL_HANDLE_ENV,sql_env_handle,i,sqlstate,
    ref NativeErrorPtr,MessageText,BufferLength,ref TextLengthPtr))!= SQL_NO_DATA)
    i++;
    my operation system is win7 64bit. Could someone help me? thanks

    I already fixed this problem.
    [DllImport("odbc32.dll")]
    extern static short SQLAllocHandle(
    long HandleType,
    int InputHandle,
    out IntPtr OutputHandle);
    I replace ushort datatype with long datatype.So it works well

  • JNDI: DirContext::list throws on exception when existing context is in LDAP

    I was able to import tutorial.ldif using LDAP Browser/Editor without incident:
    http://www-unix.mcs.anl.gov/~gawor/ldap/
    My LDAP now has the following tree:
    o=JNDITutorial
    ou=Groups
    5 cn entries
    ou=People
    10+ cn entries
    However, when calling DirContext::list("ou=People"), it throws the following exception message:
    javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; remaining name 'ou=People'
    Here is the code:
         final static String ldapServerName = "backbone.seamonkey";
        public static void main(String[] args) {
         // Set up the environment for creating the initial context
         Hashtable env = new Hashtable(11);
         env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
         env.put(Context.PROVIDER_URL, "ldap://" + ldapServerName +"/o=JNDITutorial");
         try {
             // Create initial context
             DirContext ctx = new InitialDirContext(env);
             // Return enum of people, but throws an exception...
             NamingEnumeration people = ctx.list("ou=People");

    I tried the same with a known LDAP service: OpenLDAP.org, and I get the same exception NameNotFoundException thrown with the following code:
         final static String m_ldapServerName = "OpenLDAP.org";
        public static void main(String[] args) {
         // Set up the environment for creating the initial context
         Hashtable<Object, Object> env = new Hashtable<Object, Object>();
         env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
         env.put(Context.PROVIDER_URL, "ldap://" + m_ldapServerName + ":389/");
         try {
             // Create initial context
             DirContext ctx = new InitialDirContext(env);
             // Return enum of people, but throws an exception...
             NamingEnumeration people = ctx.list("ou=People");

  • Stream connection throws IOException

    i am using a stream connection for the midp 1.0. The client logs into a server using a StreamConnection and all this is cool.
    But the application waits at the DataInputStream.read and then thows the IOException.
    my code is something like this,,
    while(true)
    if ((i = dataInputStream.read()) == -1)
    // some logic here
    the dataInputStream.read() throws the exception after approximately 7 to 8 seconds.
    anyone has an idea as to whats going wrong? why is the connection not being maintained.
    Thankyou,
    Balaji.

    Thankyou shmoove. The code is here.
    The server is setup to send information every 3 seconds to the client (upon client request,, which is working fine). For your reference,, the same code works perfectly fine with a Series 60 (midp2.0) phone, and so does the server. except that i use a SocketConnection for the midp 2.0 phone. For the very reason that midp 1.0 does not support the SocketConnection, i have to use a StreamConnection instead. the dataInputSream is bound with the StreamConnection object.
    I think the StreamConnection is somehow not persistant ,, in the sense the connection is not maintained.
    Please tell me whats wrong,
    Thankyou,
    Balaji.
    public Alert alertConnBroken = new Alert("", "Due to weak wireless link, Connection to server lost. Please reconnect!!", null, AlertType.WARNING);
    public String readString()
         String str = new String();
         while(true)
              try
                   if((ch = (char) dataInputStream.read()) == -1)                   
                        display.setCurrent(alertConnBroken);
                        break;
                   else
                      str = str + ch;
              catch(InterruptedIOException iioe)
                   iioe.printStackTrace();
                   break;
              catch (IOException ioe)
                   ioe.printStackTrace();
                   break;
                catch(EOFException eofe)                     
                    eofe.printStackTrace();                                        
                 break;
             catch (Exception e)
                e.printStackTrace();
                 break;
         return str;     
         

  • JAXB2 marshaller throws Validation Exception

    Hello All.. I am trying to marshall a JAXB Object using JAXB2 marshaller and validate it against an xsd.
    During this process of validation, the parser when reads the xsd fails with the parse error. The schema xsd is a working xsd from a webservice provider. The validation is fine when it is done on XML Spy and SOAP UI. But when this xerces xmlschema validator comes to picture its even not able to parse the XSD for validating against it.
    Here is the head of the xsd..
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
         xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
         xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
         xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
         xmlns:tns="http://com.cyber.space./services"          
         targetNamespace="http://com.cyber.space./services"
         elementFormDefault="qualified"
    and a huge schema followed.
    Step.1: I used this xsd to generate JAXB classes.
    Step2. Used jaxb2marshaller from spring.oxm,
    <bean id="marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
              <property name="contextPath" value="com.cyberspace.service"/>
              <b><property name="schema" value="classpath:pathtoXsd"/></b>
         </bean>
    so in my application , i have reference to marshaller object.so can use like this.
    request ( the jaxb request object populated with valid values as per the schema)
    result - output -- outgoing xml.
    marshaller.marshall(requsest, result);
    Here comes the problem..The out going xml is like this..
    <?xml version="1.0" encoding="UTF-8" ?>
    <Request xmlns="http://com.cyber.space./services">
    <RequestService>123</RequestService>
    etec etc etc.. son on..
    This xml when converted to soap message and sent over to webservice its accepted as valid request and response is back. But all it happens when i dont validate it against the schema that i have.
    Look at the :
    <b><property name="schema" value="classpath:pathtoXsd"/></b> set as a property to jaxb2 marshaller.
    This makes sure that the xml generated out the jaxb object after marshall process is valid against the XSD schema. Here it fails for some reason.
    If the dont ask the marshaller to validate( removing the schema property ), then the xml is fine able to proceed with next steps of sending the successfull VALID SOAP REQUEST and response is back. But if do a validation by setting the schema property with value as path to xsd.
    The error is :
    Caused by:<b> org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.2: ' ' is not a valid value of list type 'null'.</b>
         at com.sun.org.apache.xerces.internal.jaxp.validation.Util.toSAXParseException(Util.java:109)
         at com.sun.org.apache.xerces.internal.jaxp.validation.ErrorHandlerAdaptor.error(ErrorHandlerAdaptor.java:104)
         at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:382)
         at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
         at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:429)
    ...,more
    Is it a problem with namespace.? If i assume that the resulting xml out of the marshall process when validated against the XSD is failing for some missing data( business data), then the request itself would not be sent as soap requst.
    But the problem is not that with data in the xml. its some thing going on with the strict validation the validator is doing.
    Edited by: cnu_coder on May 22, 2008 7:41 AM
    Edited by: cnu_coder on May 23, 2008 8:14 AM

    Hello,
    The ABAP code looks ok except the missing if error != null statement.
    Please check the similar code for raising exception provided in the below blog:
    /people/ravi.gupta4/blog/2010/02/04/automating-cancellation-of-a-failed-message-in-xi
    Also, Can you check whether exception is raised using Dynamic config UDF and a call to abap mapping is made.
    Check the other approach of raising an exception:
    /people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping
    -Rahul

  • Limit the time of lookup and make the method to throw an Exception

    When I connect from
    Client
    Remote Desktop Client
    Server:
    SUN JAVA SYSTEM APPLICATION SERVER 9.0
    Initial Context object is initialized as per below coding,
    System.setProperty("org.omg.CORBA.ORBInitialHost", prop.getProperty("hostName"));
    System.setProperty("org.omg.CORBA.ORBInitialPort", prop.getProperty("portNumber"));
    InitialContext ctx = new InitialContext();
    while .lookup("globalJndiNameForSessionBean") method is invoked on the InitialContext object and if the server is not available, it is throwing non stop error.
    Please tell me wether I have to add any other Properties to limit the time of lookup and make the method to throw an Exception after two or three second, if the server is not available.

    What do you mean by 'non-stop error'? This can only happen if your code goes into a non-stop loop.
    The default TCP connect timeout is about 75 seconds, which in some circumstances is too long, but two or three seconds definitely isn't long enough. Ten to twenty would be more like it.
    I'm not aware of any system properties that limit the ORB connect timeout but then I'm not aware where the existing J2SE ORB system properties are documented. If anybody has ever found this please let us know.

  • ERROR : Cannot get data set while connecting to BI.

    Hi,
    I am trying to connect to BI trouggh my application. I am following one of the document which i got from SDN. But now i am getting ERROR : Cannot get data set  while connecting to BI.  Can any one tell me why i am getting this error.
    when i tried to excecute first time it gave the same error for the bellow given Querry. But after that it got excecuted. Then again It gave the same error. But it got excecuted twise like that after that it dint get excecuted once also.
    Querry:  SELECT
    [Measures].MEMBERS ON AXIS(0) ,
    NON EMPTY [0VENDOR].MEMBERS ON AXIS(1)
    FROM [0PUR_C01/0PUR_C01_DB_Q04];
    Regards,
    H.V.Swathi
    Edited by: H.V Swathi on Jun 1, 2009 1:33 PM

    HI,
    Thanks for ur reply.
    NO
    i am using this part of code to display the result in IFrame.
    IConnectionFactory connectionFactory = null;
         IBIConnection connection = null;
         IBIDataSet dataset = null;
    //        get the MDX statement entered by the User
         String mdxStatement = wdContext.currentContextElement().getMDXQ();
         wdComponentAPI.getMessageManager().reportSuccess("mdxStatement  "+mdxStatement.toString());
    //        Declare a stringbuffer to store the HTML Code
         StringBuffer l_strXmlFile = new StringBuffer();
         wdComponentAPI.getMessageManager().reportSuccess("l_strXmlFile  "+l_strXmlFile.toString());
         try {
    //        Connect to BW System
         Context initctx = new InitialContext();
    //        Perform JNDI lookup to obtain connection factory
            wdComponentAPI.getMessageManager().reportSuccess("l_strXmlFile eeeeee ");
         connectionFactory =
         (IConnectionFactory) initctx.lookup(
         "deployedAdapters/SDK_XMLA/shareable/SDK_XMLA");
    //        Establish connection using default connection properties
            wdComponentAPI.getMessageManager().reportSuccess("connectionFactory  "+connectionFactory);
         connection =
         (IBIConnection) connectionFactory.getConnectionEx(null);
         wdComponentAPI.getMessageManager().reportSuccess("connection  "+connection);
         IBIOlap olap = ((IBIConnection) connection).getOlap();
         wdComponentAPI.getMessageManager().reportSuccess("olap  "+olap);
    //     Execute the MDX statement and retrieve the data set
    //     using the execute method of the IBIOlap interface.
    dataset = olap.execute(mdxStatement);
    wdComponentAPI.getMessageManager().reportSuccess("dataset  "+dataset);
    } catch (Exception e) {
    e.printStackTrace();
    wdComponentAPI.getMessageManager().reportException(
    e.getLocalizedMessage(),
    true);
    } finally {
    try {
    connection.close();
    } catch (Exception e1) {
    //     TODO Auto-generated catch block
    e1.printStackTrace();
    if (dataset == null) {
    wdContext.currentContextElement().setResult_Visibility(
    WDVisibility.NONE);
    } else {
    wdContext.currentContextElement().setResult_Visibility(
    WDVisibility.VISIBLE);
    //     Render the data set.
    l_strXmlFile
    .append("<html>")
    .append("<head></head>")
    .append("<body>");
    //     Display the MDX that has been executed.
    l_strXmlFile
    .append("<p><b>MDX Statement that was executed:</b><br> ")
    .append("<span class=\"code\">")
    .append(mdxStatement)
    .append("</span> </p>");
    try {
    BIDataSetTableModel table =
    new BIDataSetTableModel(dataset, false);
    l_strXmlFile.append("<p>Result set:</p>");
    l_strXmlFile.append(
    "<table width=700 border=1 cellpadding=0 cellspacing=0>");
    int row = table.getRowCount();
    int col = table.getColumnCount();
    for (int i = 0; i < row; i++) {
    l_strXmlFile.append("<tr>");
    for (int j = 0; j < col; j++) {
    BITableItem item = (BITableItem) table.getValueAt(i, j);
    l_strXmlFile.append("<td class=\"headCenter\">"); l_strXmlFile.append(Helpers.escape(item.toString()));
    l_strXmlFile.append("</td>");
    l_strXmlFile.append("</tr>");
    l_strXmlFile.append("</table>");
    l_strXmlFile.append("</body></html>"); } catch (BISQLException e2) {
    //     TODO Auto-generated catch block
    e2.printStackTrace();
    //     read the stringbuffer into bytes
    byte[] l_byteData = null;
    try {
    l_byteData = l_strXmlFile.toString().getBytes("UTF-8");
    } catch (UnsupportedEncodingException e) {
    wdComponentAPI.getMessageManager().reportException(
    e.getLocalizedMessage(),
    false);
    //     Create a web resource and set the value of the
    //     context variable "IFrameData" to it's URL
    IWDCachedWebResource l_File =
    WDWebResource.getWebResource(
    l_byteData,
    WDWebResourceType.HTML);
    try {
    wdContext.currentContextElement().setIFrameData(
    l_File.getURL());
    } catch (WDURLException e1) {
    wdComponentAPI.getMessageManager().reportException(
    e1.getLocalizedMessage(),
    false);
    Reagards,
    H.V.Swathi

Maybe you are looking for