[jboss-user] [JBoss jBPM] - java.sql.SQLException: You cannot commit during a managed tr
trouby
do-not-reply at jboss.com
Wed Nov 26 14:26:45 EST 2008
Hey,
I have created a very simple seam component that injects the jbpmContext and uses it to create the schema, this is the code:
| @name("workflowManager")
| public class WorkflowManager {
|
| @In
| private JbpmContext jbpmContext;
|
|
| public void createJbpmSchema() {
| jbpmContext.getJbpmConfiguration().createSchema()
| }
| }
|
When invoked, I get the following exception:
| 21:13:32,867 ERROR [SchemaExport] schema export unsuccessful
| java.sql.SQLException: You cannot commit during a managed transaction!
| at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.jdbcCommit(BaseWrapperManagedConnection.java:581)
| at org.jboss.resource.adapter.jdbc.WrappedConnection.commit(WrappedConnection.java:482)
| at org.hibernate.tool.hbm2ddl.ManagedProviderConnectionHelper.prepare(ManagedProviderConnectionHelper.java:30)
| at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:180)
| at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:133)
| ...
|
I looked at the source code of the createSchema method,
Seems like it's just invoking jbpmContext.close(); at the end.
My JBPM/hibernate configured in the right way not to start/close a transaction it didn't start.
What is the reason of the exception?
Thanks,
Asaf.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4192610#4192610
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4192610
More information about the jboss-user
mailing list