[jboss-user] [Installation, Configuration & Deployment] - Transaction changes foiled me

chip_schoch do-not-reply at jboss.com
Fri Apr 27 16:04:43 EDT 2007


Once I got 4.2.0.cr2 up and running I ran into a new ripple.  I have a webapp that creates a UserTransaction at the beginning of each request and commits it at the end.  I am using jbpm 3.1.3 in this app.  My application code uses a different database then jbpm, both are mssql databases.  In the middle of my work flow (read the request processing)  I create a jbpmcontext and get a process instance, which hits the jbpm database.  


The code is effectively:

UserTransaction tx = (UserTransaction) getInitialContext ().lookup ("java:comp/UserTransaction");
  | tx.begin();
  | 
  | // Do some queries to application tables
  |  ...
  | 
  | // 
  | 
  | JbpmConfiguration conf = JbpmConfiguration.getInstance ();
  | JbpmContext jbpmContext = conf.createJbpmContext ();
  | 
  | // BLOWS UP HERE!!!
  | ProcessInstance pi = jbpmContext.getProcessInstance (<a process id>);
  | 


In 4.0.5.GA I had no problem however when I upgraded to 4.2.0.CR2 I get:


  | 2007-04-27 15:33:17,251 WARN  [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.transaction.arjunacore.enliststarterror] [com.arjuna.ats.internal.jta.transaction.arjunacore.enliststarterror] TransactionImple.enlistResource - XAResource.start returned: XAException.XAER_PROTO for < 131075, 28, 26, 1--3f57fdfd:818:463228cf:26f-3f57fdfd:818:463228cf:276                                                                           >
  | 2007-04-27 15:33:17,251 ERROR [STDERR] org.jboss.resource.connectionmanager.JBossLocalXAException: Trying to start a new tx when old is not complete! old: < 131075, 28, 26, 1--3f57fdfd:818:463228cf:243-3f57fdfd:818:463228cf:24a                                                                           >, new < 131075, 28, 26, 1--3f57fdfd:818:463228cf:26f-3f57fdfd:818:463228cf:276                                                                           >, flags 0
  | 2007-04-27 15:33:17,251 ERROR [STDERR] 	at org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource.start(TxConnectionManager.java:886)
  | 2007-04-27 15:33:17,251 ERROR [STDERR] 	at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:701)
  | 2007-04-27 15:33:17,251 ERROR [STDERR] 	at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:446)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TransactionSynchronization.enlist(TxConnectionManager.java:773)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:564)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:337)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.jboss.resource.connectionmanager.BaseConnectionManager2.reconnectManagedConnection(BaseConnectionManager2.java:518)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:399)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.hibernate.loader.Loader.doQuery(Loader.java:673)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.hibernate.loader.Loader.loadEntity(Loader.java:1860)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:48)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:42)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3042)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:395)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:375)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:139)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:195)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:103)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.hibernate.impl.SessionImpl.get(SessionImpl.java:815)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.hibernate.impl.SessionImpl.get(SessionImpl.java:808)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.jbpm.db.GraphSession.getProcessInstance(GraphSession.java:291)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.jbpm.JbpmContext.getProcessInstance(JbpmContext.java:331)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at com.eLynx.BPM.ProcessManager.getProcessInstance(ProcessManager.java:100)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at com.eLynx.Controller.USign.USignAuthenticationController.loginUser(USignAuthenticationController.java:429)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at java.lang.reflect.Method.invoke(Method.java:585)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at com.eLynx.Dispatch.XmlDispatcher.dispatch(XmlDispatcher.java:161)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at com.eLynx.Dispatch.XmlDispatcher.dispatch(XmlDispatcher.java:81)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at com.eLynx.Servlet.XmlWebappServlet.doPost(XmlWebappServlet.java:119)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:447)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
  | 2007-04-27 15:33:17,267 ERROR [STDERR] 	at java.lang.Thread.run(Thread.java:595)
  | 2007-04-27 15:33:17,267 DEBUG [org.hibernate.util.JDBCExceptionReporter] Cannot open connection [???]
  | org.jboss.util.NestedSQLException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: -3f57fdfd:818:463228cf:26f status: ActionStatus.ABORT_ONLY >); - nested throwable: (org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: -3f57fdfd:818:463228cf:26f status: ActionStatus.ABORT_ONLY >))
  | 	at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:94)
  | 	at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69)
  | 	at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
  | 	at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
  | 	at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
  | 	at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
  | 	at org.hibernate.loader.Loader.doQuery(Loader.java:673)
  | 	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
  | 	at org.hibernate.loader.Loader.loadEntity(Loader.java:1860)
  | 	at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:48)
  | 	at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:42)
  | 	at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3042)
  | 	at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:395)
  | 	at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:375)
  | 	at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:139)
  | 	at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:195)
  | 	at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:103)
  | 	at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
  | 	at org.hibernate.impl.SessionImpl.get(SessionImpl.java:815)
  | 	at org.hibernate.impl.SessionImpl.get(SessionImpl.java:808)
  | 	at org.jbpm.db.GraphSession.getProcessInstance(GraphSession.java:291)
  | 	at org.jbpm.JbpmContext.getProcessInstance(JbpmContext.java:331)
  | 	at com.eLynx.BPM.ProcessManager.getProcessInstance(ProcessManager.java:100)
  | 	at com.eLynx.Controller.USign.USignAuthenticationController.loginUser(USignAuthenticationController.java:429)
  | 	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:585)
  | 	at com.eLynx.Dispatch.XmlDispatcher.dispatch(XmlDispatcher.java:161)
  | 	at com.eLynx.Dispatch.XmlDispatcher.dispatch(XmlDispatcher.java:81)
  | 	at com.eLynx.Servlet.XmlWebappServlet.doPost(XmlWebappServlet.java:119)
  | 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
  | 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  | 	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  | 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
  | 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
  | 	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
  | 	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
  | 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
  | 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
  | 	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
  | 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  | 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
  | 	at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)
  | 	at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:447)
  | 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
  | 	at java.lang.Thread.run(Thread.java:595)
  | Caused by: org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: -3f57fdfd:818:463228cf:26f status: ActionStatus.ABORT_ONLY >)
  | 	at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:343)
  | 	at org.jboss.resource.connectionmanager.BaseConnectionManager2.reconnectManagedConnection(BaseConnectionManager2.java:518)
  | 	at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:399)
  | 	at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
  | 	at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
  | 	... 50 more
  | Caused by: javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: -3f57fdfd:818:463228cf:26f status: ActionStatus.ABORT_ONLY >
  | 	at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TransactionSynchronization.checkEnlisted(TxConnectionManager.java:744)
  | 	at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:577)
  | 	at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:337)
  | 	... 54 more
  | 

I see from the release notes that transactions changed.  I am not sure what to do to get the jbpmcontext to participate in the current transaction again.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041545#4041545

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041545



More information about the jboss-user mailing list