2 Replies Latest reply on Jan 2, 2003 5:56 PM by Mike

    unknown managed connection

    brian smith Newbie

      I'm getting this error below and it has me stumped. I'm wondering if I need to bump up my number of connections in JBoss or Postgresql. Has anyone else run into this problem before. I used to sporadically happen now it is happing more often.

      Enviroment
      JBoss 3.0
      using Xdoclet 1.2, Postgresql

      java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
      java.rmi.ServerException: disconnect(ManagedConnection mc: null, Object c: org.jboss.resource.adapter.jdbc.local.LocalConnection@1a5debb) called with unknown managed connection; nested exception is:
      java.lang.IllegalArgumentException: disconnect(ManagedConnection mc: null, Object c: org.jboss.resource.adapter.jdbc.local.LocalConnection@1a5debb) called with unknown managed connection

        • 1. Re: unknown managed connection
          Mike Newbie

          I am seeing this as well. I have an BMP Entity that writes to a MySQL database, which is configured exactly like the one in the examples/jca/mysql-service.xml file. Funny thing is, the exception happens AFTER the ejb-store method sucessfully completes.

          I've seen other posts that seem to suggest there is something going on with transactions. My ejb-jar.xml specifes that transactions are not supported, But I'm noticing some Transaction-related classes on the stack trace:

          12:23:12,400 DEBUG [ECompanyBean] ejbStore complete
          12:23:12,400 ERROR [LogInterceptor] RuntimeException:
          java.lang.IllegalArgumentException: disconnect(ManagedConnection mc: null, Object c: org.jboss.resource.adapter.jdbc.local.LocalConnection@28594c) called with unknown managed connection
          at org.jboss.resource.connectionmanager.BaseConnectionManager2.unregisterAssociation(BaseConnectionManager2.java:661)
          at org.jboss.resource.connectionmanager.BaseConnectionManager2.disconnect(BaseConnectionManager2.java:619)
          at org.jboss.resource.connectionmanager.CachedConnectionManager.disconnect(CachedConnectionManager.java:371)
          at org.jboss.resource.connectionmanager.CachedConnectionManager.popMetaAwareObject(CachedConnectionManager.java:160)
          at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:190)
          at org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:90)
          at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:163)
          at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:107)
          at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:69)
          at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
          at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:151)
          at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:60)
          at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
          at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204)

          .....

          • 2. Re: unknown managed connection
            Mike Newbie

            Problem solved. I had forgotten to close a JDBC Connection. As soon as I closed that connection, the problem went away.

            If you run into this problem, make sure that you close any managed connections before the end of the EJB's method invocation.