8 Replies Latest reply on Mar 7, 2003 10:54 PM by davidjencks

    JBoss 3.2 RC 2 error with datasource

    jpartner

      Moving from 3.2 beta 3 to 3.2 RC2 we find that we now see the below stack trace where ever a database connection from the configured datasource is closed. We are using mysql4 and have tried both the datasources style confiugration as well as the mbean configuration file, see below for the ds style config used.

      <local-tx-datasource>
      <jndi-name>MdocLoggingDS</jndi-name>
      <connection-url>jdbc:mysql://reliant:3306/jp_logging</connection-url>
      <driver-class>org.gjt.mm.mysql.Driver</driver-class>
      <connection-property name="user">humber</connection-property>
      <connection-property name="password">humber</connection-property>
      <min-pool-size>5</min-pool-size>
      </local-tx-datasource>





      10:47:40,643 INFO [CachedConnectionManager] Could not find a close method on alleged connection objects. Please close your own connections.
      java.lang.Exception: Stack Trace
      at org.jboss.resource.connectionmanager.CachedConnectionManager.closeAll(CachedConnectionManager.java:357)
      at org.jboss.resource.connectionmanager.CachedConnectionManager.popMetaAwareObject(CachedConnectionManager.java:199)
      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:108)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:243)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:208)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:154)
      at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:322)
      at org.jboss.ejb.Container.invoke(Container.java:652)
      at sun.reflect.GeneratedMethodAccessor57.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:101)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:88)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
      at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:109)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:82)
      at $Proxy71.getSystemSetting(Unknown Source)
      at com.xms.core.infoservices.InfoServicesImpl.setProvider(InfoServicesImpl.java:193)
      at com.xms.core.infoservices.InfoServicesImpl.init(InfoServicesImpl.java:154)
      at com.xms.core.infoservices.InfoServicesImpl.(InfoServicesImpl.java:107)
      at com.xms.core.settings.management.ejb.SettingsManagementBean.ejbCreate(SettingsManagementBean.java:117)
      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.createSession(StatefulSessionContainer.java:500)
      at org.jboss.ejb.StatefulSessionContainer.createHome(StatefulSessionContainer.java:553)
      at sun.reflect.GeneratedMethodAccessor99.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invokeHome(StatefulSessionContainer.java:836)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:105)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215)
      at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invokeHome(StatefulSessionInstanceInterceptor.java:128)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:112)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:243)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:74)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:133)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:125)
      at org.jboss.ejb.StatefulSessionContainer.internalInvokeHome(StatefulSessionContainer.java:398)
      at org.jboss.ejb.Container.invoke(Container.java:672)
      at sun.reflect.GeneratedMethodAccessor58.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:101)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:88)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
      at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:175)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:82)
      at $Proxy73.create(Unknown Source)
      at com.xms.deploy.ConfigurationInterpreterBean.getAnchorLicense(ConfigurationInterpreterBean.java:929)
      at com.xms.deploy.ConfigurationInterpreterBean.checkCurrentConfiguration(ConfigurationInterpreterBean.java:337)
      at com.xms.deploy.ConfigurationInterpreterBean.ejbTimeout(ConfigurationInterpreterBean.java:271)
      at sun.reflect.GeneratedMethodAccessor125.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:629)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:108)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:243)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:208)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:154)
      at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:322)
      at org.jboss.ejb.Container.invoke(Container.java:652)
      at sun.reflect.GeneratedMethodAccessor57.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:101)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:88)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
      at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:109)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:82)
      at $Proxy60.ejbTimeout(Unknown Source)
      at com.xms.core.timer.InvokerMessageBean.onMessage(InvokerMessageBean.java:68)
      at sun.reflect.GeneratedMethodAccessor123.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:434)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
      at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:88)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:108)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:243)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104)
      at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:100)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:208)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:154)
      at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:348)
      at org.jboss.ejb.Container.invoke(Container.java:652)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:697)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:985)
      at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:241)
      at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:601)
      at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:415)
      at org.jboss.mq.SpySession.run(SpySession.java:293)
      at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:177)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:642)
      at java.lang.Thread.run(Thread.java:536)

        • 1. Re: JBoss 3.2 RC 2 error with datasource
          jcorbin4607

          I'm seeing the same thing after migrating to 3.2RC2 from 3.2RC1. It is only an Information message, but I would like to know what is causing it. I posted a question to the user community. If I hear back I will post a response to this thread.

          J.D.

          • 2. Re: JBoss 3.2 RC 2 error with datasource
            jpartner

            I am finding that it is more than an information message since under normal usage we are seeing the pools run out of connections "No managed connections available" from the connection manager. This is due to the CachedConnectionManager recieving a ConectionRecord in the map passed into closeAll(Map cmToConnectionsMap) which it then uses reflection on to find a close method which does not exist. Does anybody have any idea what should be happening here. This is a real show stopper for us at the moment so if some can enlighten me as to the expected behaviour I will happily put the leg work into the fix.

            • 3. Re: JBoss 3.2 RC 2 error with datasource
              jpartner

              This problem seems to be more than just a warning since it seems the Connection manager is not closing down connections correctly. This means after relatively light usage the connection manager is then running out of connections and the application fails. Having rebuilt the source with some system outs it appears that the CachedConnectionManager is recieving ConnectionRecords in the map which is passed to closeAll(Map cmToConnectionsMap). Since a connection record has no close method the warning and trace appears. Does anyone know what the expected behaviour is here could this be a misconfiguration of the datasoure causing ConnectionRecords to appear in the map or is this a bug. If anyone can enlighten me on this I will happily contribute some time to resolving this issue since this is rather a show stopper at the moment. Cheers

              • 4. Re: JBoss 3.2 RC 2 error with datasource
                tbauer

                I am seeing the same error using 3.2.0RC2, but before that WAY up in the log I see this for EVERY datasource:

                20:18:17,865 INFO [XATxConnectionManager] Started
                20:18:17,867 INFO [LocalTxConnectionManager] Starting
                20:18:17,868 WARN [LocalTxConnectionManager] ----------------------------------------------------------
                20:18:17,869 WARN [LocalTxConnectionManager] ----------------------------------------------------------
                20:18:17,870 WARN [LocalTxConnectionManager] Please change your datasource setup to use TransactionManagerService with object name jboss.tm:service=TransactionManagerService
                20:18:17,871 WARN [LocalTxConnectionManager] instead of TransactionManager with value java:/TransactionManager
                20:18:17,871 WARN [LocalTxConnectionManager] ----------------------------------------------------------
                20:18:17,872 WARN [LocalTxConnectionManager] ----------------------------------------------------------
                20:18:17,877 INFO [ICSRegDS] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=LocalTxCM,name=ICSRegDS to JNDI name 'java:/ICSRegDS'
                20:18:17,878 INFO [LocalTxConnectionManager] Started

                I try and try and try to change the java:/TransactionManager in the MySQL service file to access the TransactionManagerService which is declared in the transaction-service.xml file...but nothing seems to work!!!

                Does ANYONE, yes JBoss.org that means you, know how to change the MySQL xml confirguration to use the new TransactionManagerService...


                As usual, there is NO DOCUMENTATION on these xml configuration changes, and yes I paid for the documentation set which does NOT say a word about the changes in 3.2.0... It is VERY frustrating when you guys change the configuration on practically every dot.release and don't say how we are supposed to change our file....even the mysql service config file inside /doc/example/jca does not mention any reference to TransactionManagerService... I guess I'll have to try 3.0.6

                • 5. Re: JBoss 3.2 RC 2 error with datasource
                  davidjencks

                  There are some problems in the RC2 release that are fixed in cvs.

                  AFAIK even with RC2 you will run out of connections only if you are not closing some connections before you return from your ejb method that got them. So far everyone who has experienced this problem has loudly proclaimed that they were closing all connections, went and looked, and found some that weren't closed.

                  Please use the *-ds.xml configs, I will probably remove the *-service.xml config examples.

                  • 6. Re: JBoss 3.2 RC 2 error with datasource
                    tbauer

                    Thanks, David, I will definitely check to make sure that every open has a close...even tho I'm 90%+ sure I do...

                    Even tho I'm sure I close every connection I start, I was getting very strange errors saying something to the affect like it was trying to close a transacton that was not enlisted in a managed transaction??? I will have an exact log to follow up with later or tomrrow...

                    So what is the answer to my original question above?? How to I configure a mysql ds to use the new TransactionManagerService??

                    Thank you, Tim

                    • 7. Re: JBoss 3.2 RC 2 error with datasource
                      tbauer

                      I also saw this message:

                      10:47:40,643 INFO [CachedConnectionManager] Could not find a close method on alleged connection objects. Please close your own connections.
                      java.lang.Exception: Stack Trace
                      at org.jboss.resource.connectionmanager.CachedConnectionManager.closeAll(CachedConnectionManager.java:357)
                      at

                      when I DID NOT close my connection, and I got some other message when I DID.

                      Another forum user emailed me to ask me if I had gotten any resolution to this problem, he was having same issue, but NO BODY from JBoss has commented!! I see there is a jboss-3.2.0RC3.zip build on sourceforge, when I get time I will see if it has fixed this problem...

                      • 8. Re: JBoss 3.2 RC 2 error with datasource
                        davidjencks

                        Yes, that was another problem in RC2. I believe it is fixed in cvs. I'm not sure when RC3 was released so I don't know if it is in that.