I'm a bit confused. Do the first two lines of your code create the tables? If they are enabled, you get the second error, otherwise you get the first?
Your assumption is correct Alex, if the lines that create the table are enabled I get
You cannot commit during a managed transaction! (java.lang.Exception), if are not enabled I get
Table not found: JBPM_PROCESSDEFINITION
Thanks for your help, this is drivin' me mad.
You are using container-managed transactions, right? Then you need to adjust your hibernate.properties as described in section 12.2 of the Hibernate reference manual: http://www.hibernate.org/hib_docs/v3/reference/en/html/
In particular, make the following adjustments:
Substitute the second entry by the class appropiate to your app server.
I've done all the changes, but now I'm getting this
Already marked for rollback TransactionImpl:XidImpl[FormatId=257, GlobalId=XXXXXA/22, BranchQual=, localId=22] (java.lang.Exception)
This is now a Hibernate/JTA problem. Did you configure Hibernate to obtain connections from an DataSource registered in JNDI instead of local JDBC (DriverManager) ? See section 4.3 of the Hibernate manual for more info.
Thanks Ales, your las tip was very useful, I've solved this configuring the connections