3 Replies Latest reply: Oct 19, 2007 4:06 AM by Vicky Kak RSS

JBoss error:Trying to return an unknown connection2!.....Unr

liu jw Newbie

Hello:
when I run my jca through EJB, jboss dissplays the following Info:

16:18:29,312 INFO [NoTxConnectionManager] Throwable from unregisterConnection
java.lang.IllegalStateException: Trying to return an unknown connection2! null
 at org.jboss.resource.connectionmanager.CachedConnectionManager.unregisterConnection(CachedConnectionManager.java:342)
 at org.jboss.resource.connectionmanager.NoTxConnectionManager$NoTxConnectionEventListener.connectionClosed(NoTxConnectionManager.java:88)
 at com.jca.FileManagedConnection.connectionClosedEvent(FileManagedConnection.java:178)
 at com.jca.FileConnectionImpl.close(FileConnectionImpl.java:20)
 at com.ejb.FileEJB.getTextFile(FileEJB.java:39)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
............
16:18:29,359 INFO [NoTxConnectionManager] Unregistered handle that was not registered! null for managedConnection: com.jca.FileManagedConnection@1618248
16:18:46,421 INFO [CachedConnectionManager] Closing a connection for you. Please close them yourself: com.jca.FileConnectionImpl@1a014e1
java.lang.Throwable: STACKTRACE
 at org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:290)
 at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:400)
 at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:812)
 at com.jca.FileConnectionFactoryImpl.getConnection(FileConnectionFactoryImpl.java:47)
 at com.ejb.FileEJB.getTextFile(FileEJB.java:37)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
........


Can somebody help me?



  • 2. Re: JBoss error:Trying to return an unknown connection2!....
    liu jw Newbie

    Thank you vickyk!

    When I invoke this function in ManagedConnection:

    void connectionClosedEvent()
     {
     Iterator it = connectionListeners.iterator();
     while (it.hasNext())
     {
     ConnectionEventListener listener =
     (ConnectionEventListener) it.next();
     ConnectionEvent temp = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED);
     listener.connectionClosed(temp);
     }
     }

    when it arrives at lstener.connectionClosed(temp), the following error appears:
    20:11:48,484 INFO [NoTxConnectionManager] Throwable from unregisterConnection
    java.lang.IllegalStateException: Trying to return an unknown connection2! null
     at org.jboss.resource.connectionmanager.CachedConnectionManager.unregisterConnection(CachedConnectionManager.java:342)
     at org.jboss.resource.connectionmanager.NoTxConnectionManager$NoTxConnectionEventListener.connectionClosed(NoTxConnectionManager.java:88)
     at com.jca.FileManagedConnection.connectionClosedEvent(FileManagedConnection.java:178)
     at com.jca.FileConnectionImpl.close(FileConnectionImpl.java:20)
     at com.ejb.FileEJB.getTextFile(FileEJB.java:39)
     .................
    20:11:48,531 INFO [NoTxConnectionManager] Unregistered handle that was not registered! null for managedConnection: com.jca.FileManagedConnection@5f62a9


    Then I go on it invoke connectionClosedEvent() again!! I really don't know why. This time the console prints the following Info:
    20:19:02,484 INFO [CachedConnectionManager] Closing a connection for you. Please close them yourself: com.jca.FileConnectionImpl@473996
    java.lang.Throwable: STACKTRACE
     at org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:290)
     at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:400)
     at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:812)
     at com.jca.FileConnectionFactoryImpl.getConnection(FileConnectionFactoryImpl.java:48)
     at com.ejb.FileEJB.getTextFile(FileEJB.java:37)
     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.invocation.Invocation.performCall(Invocation.java:359)
     at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
     at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
     at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
     at org.jboss.ws.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:64)
     at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
     at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
     at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
     at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
     at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
     at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
     at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
     at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
     at org.jboss.ejb.Container.invoke(Container.java:954)
     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.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
     at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
     at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
     at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
     at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:206)
     at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:192)
     at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
     at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
     at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:112)
     at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
     at $Proxy55.getTextFile(Unknown Source)
     at org.apache.jsp.doSubmit_jsp._jspService(doSubmit_jsp.java:56)
     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
     at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
     at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
     at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
     at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
     at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
     at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
     at java.lang.Thread.run(Thread.java:595)


    Wish for your reply.

  • 3. Re: JBoss error:Trying to return an unknown connection2!....
    Vicky Kak Master

     

    When I invoke this function in ManagedConnection:

    Where is this code from ?
    Looks like you have written your own RAR file and it causes issues .