-
1. Re: Problem with jBPM5.3 and (needed) activated jpa in standalone.xml
swiderski.maciej Jun 18, 2012 4:51 AM (in response to hamsterdancer)1 of 1 people found this helpfulThis 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.
HTH
-
2. Re: Problem with jBPM5.3 and (needed) activated jpa in standalone.xml
hamsterdancer Jun 18, 2012 9:46 AM (in response to swiderski.maciej)Thanks Maciej.
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 version="2.0"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd
http://java.sun.com/xml/ns/persistence/orm
http://java.sun.com/xml/ns/persistence/orm_2_0.xsd"
xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/persistence">
<persistence-unit name="org.jbpm.persistence.jpa" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:jboss/datasources/jbpmDS</jta-data-source>
<mapping-file>META-INF/JBPMorm-JPA2.xml</mapping-file>
<class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
<class>org.drools.persistence.info.SessionInfo</class>
<class>org.drools.persistence.info.WorkItemInfo</class>
<class>org.jbpm.process.audit.ProcessInstanceLog</class>
<class>org.jbpm.process.audit.NodeInstanceLog</class>
<class>org.jbpm.process.audit.VariableInstanceLog</class>
<properties>
<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" /> -->
</properties>
</persistence-unit>
</persistence>
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?
-
3. Re: Problem with jBPM5.3 and (needed) activated jpa in standalone.xml
marco.rietveld Jun 18, 2012 11:23 AM (in response to hamsterdancer)1 of 1 people found this helpfulHi,
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.
-
4. Re: Problem with jBPM5.3 and (needed) activated jpa in standalone.xml
hamsterdancer Jun 18, 2012 1:10 PM (in response to marco.rietveld)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.
-
5. Re: Problem with jBPM5.3 and (needed) activated jpa in standalone.xml
hamsterdancer Jun 18, 2012 2:05 PM (in response to hamsterdancer)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
-
6. Re: Problem with jBPM5.3 and (needed) activated jpa in standalone.xml
hamsterdancer Jun 25, 2012 11:46 AM (in response to hamsterdancer)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? :-/
-
7. Re: Problem with jBPM5.3 and (needed) activated jpa in standalone.xml
hamsterdancer Jun 25, 2012 11:54 AM (in response to hamsterdancer)Ah. Maybe it is better to post the whole log.
Before adding the btm-2.1.2.jar to the console server war: http://pastebin.com/S3QZj3hm
After adding it: http://pastebin.com/cU8Yjf3x
In both cases the I've just logged me in at the console.
-
8. Re: Problem with jBPM5.3 and (needed) activated jpa in standalone.xml
audpar Sep 18, 2012 10:19 AM (in response to hamsterdancer)Any solutions for that? I'm having the same problem...