Deploying jBPM sample application (payraiseprocess application) to Tomcat – my experience with some tricky issues:
- Added the jar files (commons-fileupload.jar, commons-validator.jar, commons-digester.jar, jakarta-oro.jar) to jBPM application library (WEB-INF\lib) or to <jbpm-directory>\lib if you’re going to perform a build (required after Hibernate mapping modification below). I got “Cannot find ActionMappings or ActionFormBeans collection” error when calling the jbpm application without these jar files.
- [In order to use MySQL instead of the built in HSQLDB] Added MySQL driver (Connector/J mysql-connector-java-3.0.16-stable-bin.jar or a recent one) to the application library (jbpm/WEB-INF/lib). I got
java.sql.SQLException: Communication link failure: Unexpected end of input streamwith an older version of Connector/J drive.
Then modified jbpm.properties (hibernate.*) to be as follows:
- payraiseprocess.par shouldn’t be “deployed” but rather the contents to be copied (not literally) to the jbpm schema (which got generated on the first run of jbpm application).
there’s an ant task (from jBPM folks) that takes a jbpm.properties file (where it should read hibernate) and accommodates the variables/files in the par file (payraiseprocess.par) to their locations in the jbpm database.
- I was getting a “XML document structures must start and end within the same entity.” error. This was due to the truncated data stored in jbpm database (Hibernate used VARCHAR(255) instead of a blob to map). One should follow this solution to change hibernate mapping files – then do a rebuild. [thanks Karim for pointing it out].
The changes to the *.hbm.xml files are quite minor – here they are:
In core/src/java/org/jbpm/model/definition/impl/DelegationImpl.hbm.xml replace:
<property name=”configuration” type=”string” length=”4000″ />
<property name=”configuration” type=”text” length=”65535″ />
In core/src/java/org/jbpm/model/definition/impl/FileImpl.hbm.xml replace
<property name=”bytes” type=”binary” />
<property name=”bytes” type=”binary” length=”65535″ />
(Don’t forget to rebuild – then redeploy the process archive .par file once again)
That’s about it… Now for the real work, discovering jBPM.
Thanks for posting these guidelines. Is there a place which contains complete instructions for deploying jBPM on Tomcat? Their website only seems to describe deploying on JBoss. Also, besides the clustering features, would I lose anything by deploying on Tomcat over JBoss?
I followed your instructions and I got to deploy the payraise process on MySQL db, but I still cannot make the example work when I try to log in.
javax.servlet.ServletException: Error on line 8 of document : XML document structures must start and end within the same entity. Nested exception: XML document structures must start and end within the same entity.
org.dom4j.DocumentException: Error on line 8 of document : XML document structures must start and end within the same entity. Nested exception: XML document structures must start and end within the same entity.
Here you can find the detailed information on how to setup JBPm on tomcat with postgres as DB
This is Prasad Jandrajupalli, I am working on jBPM and Alfresco 3.3g. So I am new to jBPM and Alfresco. If anyone knows about these two technologies, please help me.
Thanks and Regards