IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#TechXchangePresenter
 View Only
  • 1.  Tamino access failure (INOXIE8305, Invalid cursor handle)

    Posted Thu April 29, 2004 03:02 PM

    Hello,

    I get the following error:

    Tamino access failure (INOXIE8305, Invalid cursor handle).


    Here is what the doc says:
    Explanation
    The supplied cursor handle is invalid: either it was never created during the current session, or the corresponding cursor was closed in the meantime.
    Action
    Supply a correct cursor handle.

    and here is my code:

    TResponse response = xmlObjectAccessor.xquery(xquery, 5);



    Why do I get this error message? What is meant by the supplied cursor handle is invalid? How do I create a cursor handle?

    Thanks in advance,

    Julien Martin.


    #API-Management
    #webMethods
    #webMethods-Tamino-XML-Server-APIs


  • 2.  RE: Tamino access failure (INOXIE8305, Invalid cursor handle)

    Posted Thu April 29, 2004 03:20 PM

    I forgot to post the full exception:

    Tamino access failure (INOXIE8305, Invalid cursor handle)
    at com.softwareag.tamino.db.api.response.TXMLObjectFetchingIterator.newIteratorException(Unknown Source)
    at com.softwareag.tamino.db.api.response.TXMLObjectFetchingIterator.fetchBlockAt(Unknown Source)
    at com.softwareag.tamino.db.api.response.TXMLObjectFetchingIterator.fetchBlockWith(Unknown Source)
    at com.softwareag.tamino.db.api.response.TXMLObjectFetchingIterator.next(Unknown Source)
    at com.softwareag.estela.opc.util.OPCConvertUtil.convertResponseIntoDisplayableList(OPCConvertUtil.java:41)
    at com.softwareag.estela.opc.engine.OPCSearch.execute(OPCSearch.java:48)
    at com.softwareag.estela.opc.jsf.OPCAbstractQueryManagedBean.beanAction(OPCAbstractQueryManagedBean.java:98)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
    at javax.faces.component.UICommand.broadcast(UICommand.java:312)
    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:266)
    at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:380)
    at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
    at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:509)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:184)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:833)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:732)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:619)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:688)
    at java.lang.Thread.run(Thread.java:534)
    

    #webMethods
    #API-Management
    #webMethods-Tamino-XML-Server-APIs


  • 3.  RE: Tamino access failure (INOXIE8305, Invalid cursor handle)

    Posted Fri April 30, 2004 05:59 AM

    Hello Julien,

    a cursor handle is not something that you (as the user) create yourself, it is the reference to the cursor which Tamino will maintain for the results of your query. In this case the API will issue the necessary commands to Tamino to create the cursor.

    As I’ve only seen one line of your code, this is only a wild guess, but: have you started a transaction before issuing the query?

    The JavaDoc for the xquery method says the following:


    If that does not help, could you please provide some further details?

    Thanks,
    Trevor.


    #API-Management
    #webMethods
    #webMethods-Tamino-XML-Server-APIs


  • 4.  RE: Tamino access failure (INOXIE8305, Invalid cursor handle)

    Posted Fri April 30, 2004 11:12 AM

    Hi Trevor and thanks for taking the time to reply,

    Here is the code for my service locator method:

    public TXMLObjectAccessor getTXMLObjectAccessor(String uri, String collection) {
    TXMLObjectAccessor xmlObjectAccessor = null;
    try {
    TConnection connection = TConnectionFactory.getInstance().newConnection(uri);
    connection.usesLocalTransactionMode();
    xmlObjectAccessor =
    connection.newXMLObjectAccessor(
    TAccessLocation.newInstance(collection),
    TJDOMObjectModel.getInstance());
    } catch (TServerNotAvailableException e) {
    e.printStackTrace();
    }
    return xmlObjectAccessor;
    }
    </pre><BR><BR>and here is the code that does the actual access to Tamino:<BR><BR><pre class="ip-ubbcode-code-pre"> 
    public boolean execute() {
    OPCServiceLocator service_locator = OPCServiceLocator.getInstance();
    //TODO: externalize those two strings
    TXMLObjectAccessor xmlObjectAccessor = service_locator.getTXMLObjectAccessor("http://localhost/tamino/prueba_2", "ibermarcreferencec");
    TXQuery xquery = TXQuery.newInstance(opcquery.getXQuery() + footer);
    
    System.out.println("----getXQuery------\n" + opcquery.getXQuery() + footer);
    
    try {
    TResponse response = xmlObjectAccessor.xquery(xquery, 5);
    List list = OPCConvertUtil.convertResponseIntoDisplayableList(response);
    
    if (response.hasQueryContent() && response != null) {
    OPCSessionUtil.putTResponseIntoSession(response);
    OPCSessionUtil.putSearchResultsIntoSession(list);
    }
    System.out.println("----hasQueryContent------" + response.hasQueryContent());
    
    return response.hasQueryContent();
    
    
    } catch (TXQueryException e) {
    e.printStackTrace();
    return false;
    }
    }



    You mention the need to start a transaction. All I do is that:

    connection.usesLocalTransactionMode();

    Is that sufficient?

    Hoping to get your reply,

    Julien Martin.

    Software AG Spain


    #webMethods
    #webMethods-Tamino-XML-Server-APIs
    #API-Management


  • 5.  RE: Tamino access failure (INOXIE8305, Invalid cursor handle)

    Posted Wed May 05, 2004 02:58 PM

    I found part of the solution: I was using

     
    connection.usesLocalTransactionMode();
    instead of 
    connection.useLocalTransactionMode();


    Julien.

    Software AG Spain


    #webMethods-Tamino-XML-Server-APIs
    #API-Management
    #webMethods