0 Replies Latest reply on Aug 5, 2008 8:43 AM by rohit.macherla

    setRollbackOnly() error during WebService invocation

    rohit.macherla

      Hi all,

      I am using the JBoss 4.2.2.GA server installed on HP-UX platform. I have some WebServices deployed in this server. These WebServices connect to the Oracle Database 9 and after that, they invoke other WebServices. We are not using Connection Pooling when we connect to the Database and are using the regular :

      Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
      con=DriverManager.getConnection("jdbc:oracle:thin:@hostname:sid","user","pwd");
      


      We are closing the connection when all the things are done in our code. Since we are using Java, this closing of connection happens in the :
      finally{
      
      }
      
      block.
      Note that our WebServices are just Java classes that have been annotated. Hence, we are not using any EJB or Servlets directly. Atleast we are not developing them. When our WebService is invoking other WS, we sometimes get the following exception :


      javax.xml.ws.soap.SOAPFaultException: java.lang.IllegalStateException: Cannot call setRollbackOnly() current thread is NOT ass
      ociated with a transaction
      at org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.getSOAPFaultException(SOAPFaultHelperJAXWS.java:69)
      at org.jboss.ws.core.jaxws.binding.SOAP11BindingJAXWS.throwFaultException(SOAP11BindingJAXWS.java:109)
      at org.jboss.ws.core.CommonSOAPBinding.unbindResponseMessage(CommonSOAPBinding.java:553)
      at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:371)
      at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:243)
      at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:164)
      at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
      at $Proxy300.process(Unknown Source)
      at com.clarity.oss.ws.ServiceManagerCallbackImpl.orderStateChanged(ServiceManagerCallbackImpl.java:481)
      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:585)
      at org.jboss.wsf.container.jboss42.DefaultInvocationHandler.invoke(DefaultInvocationHandler.java:102)
      at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:220)
      at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:408)
      at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:272)
      at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:189)
      at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:122)
      at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
      at java.lang.Thread.run(Thread.java:595)


      According to the web, this error occurs when a transaction is marked for rollback while it is already closed. I have also found that a transaction timeout attribute needs to be updated, I don't know if it is relevant or not and I am unable to understand which timeout variable to update.

      Any help on this issue is much appreciated. Thank you.