Transaction problems with JBoss Portal + JBPM
sven.schulz Sep 28, 2005 6:11 PMHi,
I am developing an application that integrates JBoss Portal and jBpm. However, I have a problem with transaction management. Whenever I try to commit on the JBpm session, I get the follwing exception:
Caused by: javax.faces.el.EvaluationException: /deploy.xhtml @19,65 action="#{archive.deploy}": java.lang.RuntimeException: couldn't commit transaction
at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:73)
at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
... 84 more
Caused by: java.lang.RuntimeException: couldn't commit transaction
at org.jbpm.db.JbpmSession.commitTransaction(JbpmSession.java:107)
at org.jbpm.jpdl.par.ProcessArchiveDeployer.deployProcessDefinition(ProcessArchiveDeployer.java:83)
at org.jbpm.jpdl.par.ProcessArchiveDeployer.deployZipInputStream(ProcessArchiveDeployer.java:47)
at org.jbpm.jpdl.par.ProcessArchiveDeployer.deployZipInputStream(ProcessArchiveDeployer.java:42)
at de.tccproducts.chameleon.portlets.archive.ArchiveBean.deploy(ArchiveBean.java:57)
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.sun.el.parser.AstValue.invoke(AstValue.java:130)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:274)
at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
... 85 more
Caused by: org.hibernate.TransactionException: JDBC commit failed
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:110)
at org.jbpm.db.JbpmSession.commitTransaction(JbpmSession.java:103)
... 97 more
Caused by: java.sql.SQLException: You cannot commit during a managed transaction!
at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.jdbcCommit(BaseWrapperManagedConnection.java:519)
at org.jboss.resource.adapter.jdbc.WrappedConnection.commit(WrappedConnection.java:451)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:95)
... 98 more
What's the problem here! I need a solution as soon as possible. Even if it's a dirty one.
I use a hypersonic database for both jBpm and Portal. I use a preconfigured Portal (2.0.1RC1) + AS (4.0.2) installation. I copied the relevant items from the AS (4.0.2) + jBpm (3.0.1) installation into the preconfigured Portal server. Everything works fine, except for the transaction management. I think as both portal and jBpm use hibernate they must interfere somehow. Portal opening a managed transaction and jBpm trying to commit?! I changed my portal configuration to use the NoTxPortalDS datasource (which shouldn't use transactions, i suppose). Still no success!
Any idea?
Regards,
Sven Schulz