1 of 1 people found this helpful
This is due to by default jbpm relies on JPA 1.0 where JBoss AS7 provides by default support for JPA 2.0 based on hibernate4. You could configure jbpm to use JPA 2.0 and then uncomment JPA subsystem in server's configuration file. Here you can find some hints how to proceed with this.
Unfortunately I don't know that much about JPA (not to say nothing except for the idea of it^^) and so on, what's behind your link looks pretty good. But it still doesn't work.
What I've done is to copy the JBPMMorm-JPA2.xml from the jbpm-persistence-jpa.jar (here) in jbpm-gwt-console-server.war#/WEB-INF/classes/META-INF and changed the persistence.xml as follows (version numbers, mapping file and TransactionManagerLookup)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<persistence-unit name="org.jbpm.persistence.jpa" transaction-type="JTA">
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
<property name="hibernate.max_fetch_depth" value="3"/>
<!-- hbm2ddl.auto MUST BE update! The console will otherwise overwrite the schema with each new thread -->
<property name="hibernate.hbm2ddl.auto" value="update" />
<property name="hibernate.show_sql" value="false" />
<!-- for AS7 -->
<property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.BitronixJtaPlatform" />
<!-- <property name="hibernate.transaction.manager_lookup_class" value="org.jbpm.integration.console.JBPMTransactionManager" /> -->
I've although tried both lines of the TransactionManagerLookup and to tried with commenting the line <class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class> out. But it still doesn't work. Is there anything more I just don't see?
1 of 1 people found this helpful
That's a persistence.xml configured to use JPA 2 and Hibernate 4 (which is what AS 7 uses by default, I believe).
JPA is the specification for how Java should interact with "persistence", which basically means interacting with a database.
JPA 1 is a couple years old, and with JBoss AS 7, the default way to do things has moved to JPA 2. Within the context of an application on an application server, you can just think of it as a type of dependency.
Thanks a lot Marco
For other readers: I've tried it but it still doesn't work After some examination of the stacktrace:
and my persisntence.xml content:
It may be a classpath problem with dom4j. So I've tried it with removing it from jbpm-console-server.war#WEBINF/lib and from standalone/lib as well as the runtime directory which is created automatically in jbpm-installer on running "ant install.demo". But it still doesn't work.
I would be very happy about geting another nice hint or an already patched version of jbpm using JPA2.
Well ... ok ... it was a dependency problem with dom4j. The solution was now just to demove the dom4j jars in all war files jbpm (have to proof it fully the next days) ... many thanks to marko, maciejs for the help and hints
Back to the beginning. I thought the problem is solved but it looks like it isn't. The deployment process works fine except for a birt problem(which is not needed atm) with the current configuration and a vfs problem I don't understand, but I think (or better hope) it has nothing todo with the main problem. (It is the following: http://pastebin.com/tW50KVzE)
The problem now is after logging in to the console after a few moments (it looks like some guvnor initialization) I'm getting an exception for a class (bitronix.tm.TransactionManagerServices) so I've just copied the btm-2.1.2.jar from the runtime directory into WEB-INF/lib of the console server war and the human task war.
This "at least" changes the exception to the following exceptions: http://pastebin.com/Ag4epYY2
Any ideas left? :-/
Any solutions for that? I'm having the same problem...