The most likely cause of this error is trying to use the same connection in two different threads/transactions concurrently.
The first error says it could not enlist the resource in the transaction, probably because it is already enlisted in a different transaction. Regards, Adrian On Thu, 2003-08-07 at 08:50, Rafal Kedziorski wrote: > hi, > > I posted last week our connection problem with JBoss 3.2.1 and MySQL > 4.0.14. This is our mysql-ds.xml: > > <datasources> > <local-tx-datasource> > <jndi-name>MmcmsDS</jndi-name> > <connection-url>jdbc:mysql://xx.xx.xx.xx:3306/mmcms</connection-url> > <driver-class>com.mysql.jdbc.Driver</driver-class> > <user-name>...</user-name> > <password>...</password> > <connection-property name="autoReconnect">true</connection-property> > > <!--pooling parameters--> > <min-pool-size>5</min-pool-size> > <max-pool-size>50</max-pool-size> > <blocking-timeout-millis>5000</blocking-timeout-millis> > <idle-timeout-minutes>15</idle-timeout-minutes> > </local-tx-datasource> > </datasources> > > > but we get now this exceptions: > > 2003-08-07 09:33:53,898 FATAL [de.polonium.component.database.MySQL] > getConnection() failed > org.jboss.util.NestedSQLException: Could not enlist in transaction on > entering meta-aware object!javax.transaction.SystemException: > enlistResource failed; - nested throwable: > (javax.resource.ResourceException: Could not enlist in transaction on > entering meta-aware object!javax.transaction.SystemException: > enlistResource failed) > at > org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java(Compiled > > Code)) > at > de.polonium.component.database.AbstractBaseDatabase.getConnection(Unknown > Source) > at de.polonium.ejb.sessionbeans.AbstractSessionBean.getConnection(Unknown > Source) > at > de.polonium.ejb.sessionbeans.AbstractFacadeStatelessSessionBean.checkAclPermission(Unknown > > Source) > at de.polonium.ejb.media.sessionbeans.MediaFacade.getMedia(Unknown Source) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled > > Code)) > at java.lang.reflect.Method.invoke(Method.java(Compiled Code)) > at > org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java(Compiled > > Code)) > at > org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java(Compiled > > Code)) > at > org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java(Compiled > > Code)) > at > org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java(Compiled > > Code)) > at > org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java(Compiled > > Code)) > at > org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java(Compiled > Code)) > at > org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java(Compiled > Code)) > at > org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java(Compiled Code)) > at > org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java(Compiled > > Code)) > at > org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java(Compiled > > Code)) > at org.jboss.ejb.Container.invoke(Container.java(Compiled Code)) > at > org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java(Compiled > > Code)) > at > org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java(Compiled > > Code)) > at $Proxy171.getMedia(Unknown Source) > at de.polonium.xmlapi.request.media.GetMediaMetaDataRequest.run(Unknown > Source) > at > de.polonium.xmlapi.analyzer.RequestQueryAnalyzer.analyzeDocument(Unknown > Source) > at de.polonium.servlets.xmlapi.MmcmsXMLApiServlet.doPost(Unknown Source) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360) > at > org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294) > at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558) > at org.mortbay.http.HttpContext.handle(HttpContext.java:1714) > at > org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507) > at org.mortbay.http.HttpContext.handle(HttpContext.java:1664) > at org.mortbay.http.HttpServer.service(HttpServer.java(Compiled Code)) > at org.jboss.jetty.Jetty.service(Jetty.java:460) > at org.mortbay.http.HttpConnection.service(HttpConnection.java:775) > at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939) > at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792) > at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201) > at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289) > at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java(Compiled Code)) > Caused by: javax.resource.ResourceException: Could not enlist in > transaction on entering meta-aware > object!javax.transaction.SystemException: enlistResource failed > at > org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java(Compiled > > Code)) > at > org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java(Compiled > > Code)) > at > org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java(Inlined > > Compiled Code)) > ... 42 more > 2003-08-07 09:33:54,123 FATAL [de.polonium.servlets.ErrorServlet] doGet() > error request from 10.0.60.21 (10.0.60.21) > status_code: 500 > uri: /mmcmsxml;jsessionid=2mxo00vh3t0dm > exception: > org.jboss.tm.JBossTransactionRolledbackLocalException: null; > CausedByException is: > wrong xid in rollback: expected: null, got: XidImpl [FormatId=257, > GlobalId=magix-files//1587, BranchQual=1]; - nested throwable: > (org.jboss.resource.connectionmanager.JBossLocalXAException: wrong xid in > rollback: expected: null, got: XidImpl [FormatId=257, > GlobalId=magix-files//1587, BranchQual=1]) > at > org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCMT.java:390) > at > org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java(Compiled > > Code)) > at > org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java(Compiled > Code)) > at > org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java(Compiled > Code)) > at > org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java(Compiled Code)) > at > org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java(Compiled > > Code)) > at > org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java(Compiled > > Code)) > at org.jboss.ejb.Container.invoke(Container.java(Compiled Code)) > at > org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java(Compiled > > Code)) > at > org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java(Compiled > > Code)) > at $Proxy171.getMedia(Unknown Source) > at de.polonium.xmlapi.request.media.GetMediaMetaDataRequest.run(Unknown > Source) > at > de.polonium.xmlapi.analyzer.RequestQueryAnalyzer.analyzeDocument(Unknown > Source) > at de.polonium.servlets.xmlapi.MmcmsXMLApiServlet.doPost(Unknown Source) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360) > at > org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294) > at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558) > at org.mortbay.http.HttpContext.handle(HttpContext.java:1714) > at > org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507) > at org.mortbay.http.HttpContext.handle(HttpContext.java:1664) > at org.mortbay.http.HttpServer.service(HttpServer.java(Compiled Code)) > at org.jboss.jetty.Jetty.service(Jetty.java:460) > at org.mortbay.http.HttpConnection.service(HttpConnection.java:775) > at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939) > at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792) > at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201) > at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289) > at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java(Compiled Code)) > Caused by: org.jboss.resource.connectionmanager.JBossLocalXAException: > wrong xid in rollback: expected: null, got: XidImpl [FormatId=257, > GlobalId=magix-files//1587, BranchQual=1] > at > org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource.rollback(TxConnectionManager.java:854) > at org.jboss.tm.TransactionImpl.rollbackResources(TransactionImpl.java:1648) > at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:394) > at > org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCMT.java:369) > ... 29 more > org.jboss.resource.connectionmanager.JBossLocalXAException: wrong xid in > rollback: expected: null, got: XidImpl [FormatId=257, > GlobalId=magix-files//1587, BranchQual=1] > at > org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource.rollback(TxConnectionManager.java:854) > at org.jboss.tm.TransactionImpl.rollbackResources(TransactionImpl.java:1648) > at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:394) > at > org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCMT.java:369) > at > org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java(Compiled > > Code)) > at > org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java(Compiled > Code)) > at > org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java(Compiled > Code)) > at > org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java(Compiled Code)) > at > org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java(Compiled > > Code)) > at > org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java(Compiled > > Code)) > at org.jboss.ejb.Container.invoke(Container.java(Compiled Code)) > at > org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java(Compiled > > Code)) > at > org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java(Compiled > > Code)) > at $Proxy171.getMedia(Unknown Source) > at de.polonium.xmlapi.request.media.GetMediaMetaDataRequest.run(Unknown > Source) > at > de.polonium.xmlapi.analyzer.RequestQueryAnalyzer.analyzeDocument(Unknown > Source) > at de.polonium.servlets.xmlapi.MmcmsXMLApiServlet.doPost(Unknown Source) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360) > at > org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294) > at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558) > at org.mortbay.http.HttpContext.handle(HttpContext.java:1714) > at > org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507) > at org.mortbay.http.HttpContext.handle(HttpContext.java:1664) > at org.mortbay.http.HttpServer.service(HttpServer.java(Compiled Code)) > at org.jboss.jetty.Jetty.service(Jetty.java:460) > at org.mortbay.http.HttpConnection.service(HttpConnection.java:775) > at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939) > at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792) > at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201) > at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289) > at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java(Compiled Code)) > > > Regards, > Rafal > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 > _______________________________________________ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user -- xxxxxxxxxxxxxxxxxxxxxxxx Adrian Brock Director of Support Back Office JBoss Group, LLC xxxxxxxxxxxxxxxxxxxxxxxx ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
