1 Reply Latest reply on Sep 10, 2002 6:14 PM by David Jencks

    disconnect ... unknown manged connection

    Thorsten Kitz Newbie

      Forwarded from CMP forum:

      Hi,

      I have a strange problem with a CMP EJB. When I execute the following code:

      Collection colKostenstellen = ejbKSHome.findByNutzerRolle(this.getNProfilId());
      Iterator itKostenstellen = colKostenstellen.iterator();

      // delete old cost centers
      while(itKostenstellen.hasNext()) {
      ejbKSRemote = (Kostenstellen)itKostenstellen.next();
      ejbKSRemote.remove();
      }

      I get SOMETIMES the following exception, which means it works one out of 3 or 4 times:

      2002-09-09 09:15:05,871 DEBUG [ObjectPoolFilter] Session with id=0ZHxj1nyE-m1jE2YUdaMug** attached to thread Thread-43
      2002-09-09 09:15:05,922 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCFindByPrimaryKeyQuery.Nutzerrollen.findByPrimaryKey] Executing SQL: SELECT NURO_ID FROM NUTZERROLLEN WHERE NURO_ID=?
      2002-09-09 09:15:05,926 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.Nutzerrollen] Executing SQL: SELECT NURO_ANGELEGT, NURO_AENDERUNG, NURO_NAME, NURO_BEARBEITER FROM NUTZERROLLEN WHERE (NURO_ID=?)
      2002-09-09 09:15:05,931 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCJBossQLQuery.Kostenstellen.findByNutzerRolle] Executing SQL: SELECT t0_ks.KOST_ID FROM KOSTENSTELLEN t0_ks WHERE t0_ks.KOST_NURO_ID = ? ORDER BY t0_ks.KOST_KOSTENSTELLE ASC
      2002-09-09 09:15:05,935 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.Kostenstellen] Executing SQL: SELECT KOST_KOSTENSTELLE, KOST_ANGELEGT, KOST_AENDERUNG, KOST_BEARBEITER, KOST_NURO_ID FROM KOSTENSTELLEN WHERE (KOST_ID=?)
      2002-09-09 09:15:05,940 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCRemoveEntityCommand.Kostenstellen] Executing SQL: DELETE FROM KOSTENSTELLEN WHERE KOST_ID=?
      2002-09-09 09:15:05,942 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCRemoveEntityCommand.Kostenstellen] Remove: Rows affected = 1
      2002-09-09 09:15:05,943 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackLocalException, causedBy:
      java.lang.IllegalArgumentException: disconnect(ManagedConnection mc: null, Object c: org.jboss.resource.adapter.jdbc.local.LocalConnection@36b16) 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.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:152)
      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:178)
      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:203)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:493)
      at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invoke(BaseLocalContainerInvoker.java:301)
      at org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:38)
      at $Proxy59.remove(Unknown Source)
      at com.trimondo.apps.trimis.ejb.VerwaltungBean.profilSchreiben(VerwaltungBean.java:301)
      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 org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulSessionContainer.java:817)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
      at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:266)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:178)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:60)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:203)
      at org.jboss.ejb.StatefulSessionContainer.invoke(StatefulSessionContainer.java:380)
      at org.jboss.ejb.Container.invoke(Container.java:720)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:98)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:73)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:76)
      at org.jboss.proxy.ejb.StatefulSessionInterceptor.invoke(StatefulSessionInterceptor.java:117)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
      at $Proxy57.profilSchreiben(Unknown Source)
      at com.trimondo.apps.trimis.servlets.VerwaltungServlet.service(VerwaltungServlet.java:220)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at com.trimondo.system.appserver.objectpool.ObjectPoolFilter.doFilter(ObjectPoolFilter.java:43)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.jboss.web.catalina.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:48)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at com.trimondo.system.appserver.bigip.BigIPValve.invoke(BigIPValve.java:151)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.connector.warp.WarpRequestHandler.handle(WarpRequestHandler.java:217)
      at org.apache.catalina.connector.warp.WarpConnection.run(WarpConnection.java:194)
      at java.lang.Thread.run(Thread.java:536)


      I am using JBoss 3.0.2 under Linux, Oracle 8.1.7 with Oracle JDBC driver version 9.2.0.1. This happens not only at this specific part, but also on other parts where JBoss are forced to commit changes to the database. Every other "read-only" database stuff works like a charm.

      Since this is an urgent problem, I would very much appreciate any help.

      Thanks,

      Thorsten.