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
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to