4 Replies Latest reply on Aug 26, 2002 7:28 PM by Jelle van Geuns

    IllegalArgumentException when disconnecting from data source

    Jelle van Geuns Newbie

      Hi,

      I'm trying to deploy a third party bean (for which I don't have the source) on JBoss 3.0.0 using Cloudscape 4.0 as the data source.

      I keep getting the following exception:
      java.lang.IllegalArgumentException: disconnect(ManagedConnection mc: null, Object c: org.jboss.resource.adapter.jdbc.local.LocalConnection@8497f6) called with unknown managed connection
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.unregisterAssociation(BaseConnectionManager2.java:661)

      See below for the last part of the server trace (including the full stack) and the configuration file for the Cloudscape DS.

      I wrote my own test bean and it can get to the DB OK. So somehow the third-party bean must be doing something different, but I can't see what without the source.... It looks related to bug 574199 (JCA - rollback w/out begin), but I'm not sure how exactly.

      Does anyone have any idea what might be causing this, and how I could work around it?

      Thanks in advance,

      Jelle

      --------------- Server trace + stack --------------
      2002-07-29 18:23:12,640 INFO [STDOUT] TestEJBBean.ejbCreate()

      2002-07-29 18:23:12,730 DEBUG [org.jboss.mq.referenceable.SpyConnectionFactoryObjectFactory] Extracting SpyConnectionFactory from reference

      2002-07-29 18:23:12,750 DEBUG [org.jboss.mq.referenceable.SpyConnectionFactoryObjectFactory] The GenericConnectionFactory is: GenericConnectionFactory:[server=org.jboss.mq.il.oil.OILServerIL@554233,connectionProperties={OIL_TCPNODELAY_KEY=yes, PingPeriod=60000, OIL_PORT_KEY=8090, ClientILService=org.jboss.mq.il.oil.OILClientILService, OIL_ADDRESS_KEY=192.168.2.165}]

      2002-07-29 18:23:12,750 INFO [STDOUT] Found connection factoryorg.jboss.mq.SpyConnectionFactory@6d3b92

      2002-07-29 18:23:12,750 TRACE [org.jboss.resource.connectionmanager.RARDeployment] RARDeployment.getObjectInstance, name = 'jdbc.com.motorola.oss.ossj.qos.fm.ri.DataSource'

      2002-07-29 18:23:12,750 INFO [STDOUT] Found ds: org.jboss.resource.adapter.jdbc.local.LocalDataSource@1db5ec

      2002-07-29 18:23:12,840 TRACE [org.jboss.resource.connectionmanager.LocalTxConnectionManager] subject: Subject:
      Principal: cloudscape
      Private Credential: javax.resource.spi.security.PasswordCredential@0


      2002-07-29 18:23:12,840 INFO [org.jboss.resource.connectionmanager.LocalTxConnectionManager] getManagedConnection returning unassociated connection

      2002-07-29 18:23:12,880 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] internalRegisterPool: registering pool with interval 900000 old interval: 9223372036854775807

      2002-07-29 18:23:12,880 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] internalRegisterPool: about to notify thread: old next: 1027992642880, new next: 1027992642880

      2002-07-29 18:23:12,880 DEBUG [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Using properties: {user=, password=}

      2002-07-29 18:23:12,880 DEBUG [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Checking driver for URL: jdbc:cloudscape:rmi://localhost:1088/FMRIDB

      2002-07-29 18:23:12,880 DEBUG [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Driver not yet registered for url: jdbc:cloudscape:rmi://localhost:1088/FMRIDB

      2002-07-29 18:23:12,880 DEBUG [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Driver not yet registered for url: jdbc:cloudscape:rmi://localhost:1088/FMRIDB

      2002-07-29 18:23:12,890 DEBUG [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Driver already registered for url: jdbc:cloudscape:rmi://localhost:1088/FMRIDB

      2002-07-29 18:23:13,100 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] returning new ManagedConnection

      2002-07-29 18:23:13,110 TRACE [org.jboss.resource.connectionmanager.LocalTxConnectionManager] registering ConnectionEventListener for ManagedConnection: org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@59054d

      2002-07-29 18:23:13,120 TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] registering connection from org.jboss.resource.connectionmanager.LocalTxConnectionManager@f268de, connection record: org.jboss.resource.connectionmanager.ConnectionRecord@c2cf83, key: null

      2002-07-29 18:23:13,130 INFO [STDOUT] Created connection: org.jboss.resource.adapter.jdbc.local.LocalConnection@7748d3

      2002-07-29 18:23:13,431 INFO [STDOUT] Found 1 alarms in DB

      2002-07-29 18:23:13,431 TRACE [org.jboss.resource.connectionmanager.LocalTxConnectionManager$LocalConnectionEventListener] connectionClosed called

      2002-07-29 18:23:13,431 TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] unregistering connection from org.jboss.resource.connectionmanager.LocalTxConnectionManager@f268de, object: org.jboss.resource.adapter.jdbc.local.LocalConnection@7748d3, key: null

      2002-07-29 18:23:13,431 TRACE [org.jboss.resource.connectionmanager.LocalTxConnectionManager$LocalConnectionEventListener] unregisterConnection: 0

      2002-07-29 18:23:13,441 TRACE [org.jboss.resource.connectionmanager.LocalTxConnectionManager$LocalConnectionEventListener] delisting currenttx: null, cel: org.jboss.resource.connectionmanager.LocalTxConnectionManager$LocalConnectionEventListener@75f5b7

      2002-07-29 18:23:13,441 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] putting ManagedConnection back into pool

      2002-07-29 18:23:13,451 TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] new stack for key: myejb.TestEJBBean@c017e9

      2002-07-29 18:23:13,451 TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] popped object: myejb.TestEJBBean@c017e9

      2002-07-29 18:23:13,571 DEBUG [org.jboss.mq.il.oil.OILClientIL] ConnectionReceiverOILClient is connecting to: 192.168.2.165:2257

      2002-07-29 18:23:13,621 WARN [org.jboss.mq.security.SecurityManager] No SecurityMetadadata was available for System/DFW/ApplicationType/QoS/AlarmMonitor/Application/1-0;1-0;JSR90FMRI/Comp/JVTEventTopic adding default security conf

      2002-07-29 18:23:20,250 INFO [STDOUT] java.lang.ClassNotFoundException: weblogic.logging.NonCatalogLogger

      2002-07-29 18:23:20,301 INFO [STDOUT] <Jul 29, 2002 6:23:20 PM> <com.motorola.fmri> <AlarmMonitorSessionBean:ejbCreate>

      2002-07-29 18:23:20,311 TRACE [org.jboss.resource.connectionmanager.RARDeployment] RARDeployment.getObjectInstance, name = 'jdbc.com.motorola.oss.ossj.qos.fm.ri.DataSource'

      2002-07-29 18:23:20,321 DEBUG [org.jboss.mq.referenceable.SpyConnectionFactoryObjectFactory] Extracting SpyConnectionFactory from reference

      2002-07-29 18:23:20,331 DEBUG [org.jboss.mq.referenceable.SpyConnectionFactoryObjectFactory] The GenericConnectionFactory is: GenericConnectionFactory:[server=org.jboss.mq.il.oil.OILServerIL@e63606,connectionProperties={OIL_TCPNODELAY_KEY=yes, PingPeriod=60000, OIL_PORT_KEY=8090, ClientILService=org.jboss.mq.il.oil.OILClientILService, OIL_ADDRESS_KEY=192.168.2.165}]

      2002-07-29 18:23:20,331 DEBUG [org.jboss.mq.referenceable.SpyDestinationObjectFactory] SpyDestinationObjectFactory->getObjectInstance()

      2002-07-29 18:23:20,341 DEBUG [org.jboss.mq.GenericConnectionFactory] Handing out ClientIL: org.jboss.mq.il.oil.OILClientILService

      2002-07-29 18:23:20,361 DEBUG [org.jboss.mq.il.oil.OILClientILService] Waiting for the server to connect to me on port 2261

      2002-07-29 18:23:20,361 DEBUG [org.jboss.mq.il.oil.OILClientIL] ConnectionReceiverOILClient is connecting to: 192.168.2.165:2261

      2002-07-29 18:23:20,381 INFO [STDOUT] <Jul 29, 2002 6:23:20 PM> <com.motorola.fmri> <AlarmMonitorSessionBean:ejbCreate>

      2002-07-29 18:23:20,381 TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] new stack for key: com.motorola.fmri.AlarmMonitorSessionBean@b3b6a6

      2002-07-29 18:23:20,461 TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] popped object: com.motorola.fmri.AlarmMonitorSessionBean@b3b6a6

      2002-07-29 18:23:20,751 WARN [org.jboss.mq.security.SecurityManager] No SecurityMetadadata was available for Private/System/DFW/ApplicationType/QoS/AlarmMonitor/Application/1-0;1-0;JSR90FMRI/BackEndEventTopic adding default security conf

      2002-07-29 18:23:29,654 TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] old stack for key: com.motorola.fmri.AlarmMonitorSessionBean@b3b6a6

      2002-07-29 18:23:29,654 TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] popped object: com.motorola.fmri.AlarmMonitorSessionBean@b3b6a6

      2002-07-29 18:23:55,882 DEBUG [org.jboss.mq.il.oil.OILClientIL] ConnectionReceiverOILClient is connecting to: 192.168.2.165:2266

      2002-07-29 18:23:56,372 TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] new stack for key: com.motorola.fmri.AlarmMonitorSessionBean@b3b6a6

      2002-07-29 18:23:56,623 TRACE [org.jboss.resource.connectionmanager.LocalTxConnectionManager] subject: Subject:
      Principal: cloudscape
      Private Credential: javax.resource.spi.security.PasswordCredential@0


      2002-07-29 18:23:56,623 INFO [org.jboss.resource.connectionmanager.LocalTxConnectionManager] getManagedConnection returning unassociated connection

      2002-07-29 18:23:56,633 TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] returning ManagedConnection from pool

      2002-07-29 18:23:56,633 TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] registering connection from org.jboss.resource.connectionmanager.LocalTxConnectionManager@f268de, connection record: org.jboss.resource.connectionmanager.ConnectionRecord@93c4f1, key: com.motorola.fmri.AlarmMonitorSessionBean@b3b6a6

      2002-07-29 18:23:56,773 TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] old stack for key: com.motorola.fmri.AlarmValueIteratorSessionBean@458dcb

      2002-07-29 18:23:56,773 TRACE [org.jboss.resource.connectionmanager.LocalTxConnectionManager$LocalConnectionEventListener] unregisterConnection: 0

      2002-07-29 18:23:56,773 TRACE [org.jboss.resource.connectionmanager.LocalTxConnectionManager$LocalConnectionEventListener] delisting currenttx: null, cel: org.jboss.resource.connectionmanager.LocalTxConnectionManager$LocalConnectionEventListener@75f5b7

      2002-07-29 18:23:56,773 TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] popped object: com.motorola.fmri.AlarmMonitorSessionBean@b3b6a6

      2002-07-29 18:23:56,783 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackException, causedBy:

      java.lang.IllegalArgumentException: disconnect(ManagedConnection mc: null, Object c: org.jboss.resource.adapter.jdbc.local.LocalConnection@f221f6) 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:358)

      at org.jboss.resource.connectionmanager.CachedConnectionManager.popMetaAwareObject(CachedConnectionManager.java:149)

      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:190)

      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)

      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:96)

      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:142)

      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:61)

      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:129)

      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:166)

      at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)

      at org.jboss.ejb.Container.invoke(Container.java:705)

      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)

      at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:362)

      at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:324)

      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)

      at sun.rmi.transport.Transport$1.run(Transport.java:148)

      at java.security.AccessController.doPrivileged(Native Method)

      at sun.rmi.transport.Transport.serviceCall(Transport.java:144)

      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)

      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)

      at java.lang.Thread.run(Thread.java:536)

      2002-07-29 18:28:13,803 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] Resized cache for bean AlarmValueIterator: old capacity = 1000000, new capacity = 50

      --------------------- data source config -------------
      <?xml version="1.0" encoding="UTF-8"?>

      <!-- ===================================================================== -->
      <!-- -->
      <!-- JBoss Server Configuration -->
      <!-- -->
      <!-- ===================================================================== -->



      <!-- ==================================================================== -->
      <!-- ConnectionManager setup for Cloudscape -->
      <!-- ==================================================================== -->



      CloudscapeDbRealm

      <depends optional-attribute-name="ManagedConnectionFactoryName">
      <!--embedded mbean-->


      jdbc.com.motorola.oss.ossj.qos.fm.ri.DataSource
      <!-- FMRI DS -->



      <!-- For local access
      <config-property name="ConnectionURL" type="java.lang.String">jdbc:cloudscape:FMRIDB</config-property>
      <config-property name="DriverClass" type="java.lang.String">COM.cloudscape.core.JDBCDriver</config-property>
      -->
      <!-- For access through RMI -->
      <config-property name="ConnectionURL" type="java.lang.String">jdbc:cloudscape:rmi://localhost:1088/FMRIDB</config-property>
      <config-property name="DriverClass" type="java.lang.String">COM.cloudscape.core.RmiJdbcDriver</config-property>
      <!--set these only if you want only default logins, not through JAAS -->
      <config-property name="UserName" type="java.lang.String"></config-property>
      <config-property name="Password" type="java.lang.String"></config-property>



      <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper



      <depends optional-attribute-name="ManagedConnectionPool">
      <!--embedded mbean-->


      0
      50
      5000
      15
      <!--criteria indicates if Subject (from security domain) or app supplied
      parameters (such as from getConnection(user, pw)) are used to distinguish
      connections in the pool. Choices are
      ByContainerAndApplication (use both),
      ByContainer (use Subject),
      ByApplication (use app supplied params only),
      ByNothing (all connections are equivalent, usually if adapter supports
      reauthentication)-->
      ByContainer



      <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager

      <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:name=JaasSecurityManager

      java:/TransactionManager

      <!--make the rar deploy! hack till better deployment-->
      jboss.jca:service=RARDeployer