For running jBPM 3.2 on Tomcat see this page
JBoss jBPM : Java Business Process Management on Tomcat with MySQL or HSQLDB
Fabricio Garcia Imbrizi, MURAH Technologies, www.murah.com.br
03/18/2005
1. CONSIDERATIONS
Many people have difficulties to install jBPM in the Tomcat with Mysql or HSQLDB database. I wrote this manual based in this difficulties and Users and Developers forums.
All information describes in this document can be found in the JBoss jBPM official web site, Users and Developers Forums and JBoss official web site.
I would like to thanks Tom Baeyens, Jan-Philipp Bolle, Stephane Carrez and all persons that contributed with questions. All credits goes to the authors.
Unzip the jboss-jbpm-2.zip in the folder of your choice. I considered this folder as <JBPM_HOME>.
3.2. Alter <JBPM_HOME>/build.properties
Remove all code and insert:
jbpm.home=<JBPM_HOME>
ant.home=<ANT_HOME>
jboss.home=
jbpm.pde=
, than:
jboss.home and jbpm.pde can be empty.
3.3. Alter <JBPM_HOME>/core/schema.generation.properties
Remove all code and insert:
hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect?
hibernate.connection.driver_class=com.mysql.jdbc.Driver
hibernate.query.substitutions=true=1, false=0
hibernate.connection.url=jdbc:mysql://localhost:3306/jbpm
hibernate.connection.username=<USER_NAME>
hibernate.connection.password=<PASSWORD>
, than:
<USER_NAME> is the user of database and <PASSWORD> is the password of that user on database.
3.4. Alter <JBPM_HOME>/web/src/jbpm.war/WEB-INF/classes/jbpm.properties
Remove all code and insert:
jbpm.log.stdout=off
hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect?
hibernate.connection.driver_class=com.mysql.jdbc.Driver
hibernate.query.substitutions=true=1, false=0
hibernate.connection.url=jdbc:mysql://localhost:3306/jbpm
hibernate.connection.username=<USER_NAME>
hibernate.connection.password=<PASSWORD>
, than:
<USER_NAME> is the user of database and <PASSWORD> is the password of that user on database.
3.5. Alter <JBPM_HOME>/core/src/java/org/jbpm/model/definition/impl/DelegationImpl.hbm.xml
3.7. Alter <JBPM_HOME>/core/src/java/org/jbpm/persistence/hibernate/HibernateSession.java
Replace
private static final String latestDefinitionQuery = "select d "
+ "from d in class org.jbpm.model.definition.impl.DefinitionImpl? "
+ "where d.name = ? "
+ " and d.version = ( "
+ " select max(d2.version) "
+ " from d2 in class org.jbpm.model.definition.impl.DefinitionImpl? "
+ " where d2.name = d.name )";
to
private static final String latestDefinitionQuery = "select d "
+ "from d in class org.jbpm.model.definition.impl.DefinitionImpl? "
+ "where d.name = ? "
+ " order by d.version desc ";
3.8. Alter <JBPM_HOME>/core/src/java/org/jbpm/model/execution/impl/VariableInstanceImpl.hbm.xml
In target <target name="generate.ddl" �¢���¦>, replace:
<mkdir dir="../target/sql" />
to
<mkdir dir="target/sql" />
3.11. Terminal
Open a console in directory <JBPM_HOME>/core
3.12. Generate DDL SQL script
Execute the ant target �¢����generate.ddl�¢���� with command 'ant generate.ddl' in <JBPM_HOME>/core
Now, you have generated a DDL script that creates the database in file <JBPM_HOME>/core/target/sql/create-jbpm-database.sql
Create a new database with the name jbpm on MySQL.
3.15. Deploying JBoss jBPM
Execute the ant target �¢����deploy�¢��� with command ant deploy in <JBPM_HOME>/web
3.16. Deploying a process archive
Verify if your database is running. If not, start it.
Execute the ant target �¢����deploy.process.archives�¢��� with command ant deploy.process.archives in <JBPM_HOME>/web
3.17. Deploying JBoss jBPM on Tomcat
Copy <JBPM_HOME>/web/target/jbpm.war to <TOMCAT>/webapps
The directory created on Tomcat of jBpm is refereed as <JBPM_HOME_TOMCAT>
Add MySQL Connector/J on <TOMCAT>/webapps/<JBPM_HOME_TOMCAT>/WEB-INF/lib
3.19. Commons Digester
Add the jar file commons-digester.jar on <TOMCAT>/webapps/<JBPM_HOME_TOMCAT>/WEB-INF/lib
JBoss jBPM, Tomcat and HSQLDB
To use the JBoss jBPM example, follow the steps:
4.1. Root Directory
Unzip the jboss-jbpm-2.zip in the folder of your choice.
I considered this folder as <JBPM_HOME>.
4.2. Alter <JBPM_HOME>/build.properties
jbpm.home=<JBPM_HOME>
ant.home=<ANT_HOME>
jboss.home=
jbpm.pde=
, than:
jboss.home and jbpm.pde can stay empty.
4.3. Alter <JBPM_HOME>/web/src/jbpm.war/WEB-INF/classes/jbpm.properties
Replace the port of database:
hibernate.connection.url=jdbc:hsqldb:hsql://localhost:<PORTA>
, than:
<PORTA> is the number of port where HSQLDB is running. Normally is 9001.
4.4. Terminal
Open a console in directory <JBPM_HOME>/web
4.5. Deploying JBoss jBPM
Execute the ant target �¢����deploy�¢��� with command ant deploy in <JBPM_HOME>/web
4.6. Deploying a process archive
Verify if your database is running. If not, start it.
Execute the ant target �¢����deploy.process.archives�¢��� with command ant deploy.process.archives in <JBPM_HOME>/web
4.7. Deploying JBoss jBPM on Tomcat
Copy <JBPM_HOME>/web/target/jbpm.war to <TOMCAT>/webapps
The directory created on Tomcat of jBpm is refereed as <JBPM_HOME_TOMCAT>
4.8. HSQLDB Drives
Copy the jar files <JBPM_HOME>/lib/hsqldb/hsqldb.jar and <JBPM_HOME>/lib/hsqldb/pg73jdbc3.jar to <TOMCAT>/webapps/<JBPM_HOME_TOMCAT>/WEB-INF/lib
4.9. Commons Digester
Add the jar file commons-digester.jar on <TOMCAT>/webapps/<JBPM_HOME_TOMCAT>/WEB-INF/lib
References
Commons Digester - http://jakarta.apache.org/site/downloads/downloads_commons-digester.cgi
Developers forum - http://sourceforge.net/forum/forum.php?forum_id=240086
JBoss jBPM - http://www.jbpm.org or http://www.jboss.com/products/overview/jbpm
JBoss jBPM 2.0 - http://sourceforge.net/project/showfiles.php?group_id=70542&package_id=117680 MySQL 4.1.8 - http://dev.mysql.com/downloads/mysql/4.1.html MySQL Connector/J - http://dev.mysql.com/downloads/connector/j/3.1.html
Tomcat 5.0.18 - http://jakarta.apache.org/site/downloads/downloads_tomcat-5.cgi
Users forum - http://sourceforge.net/forum/forum.php?forum_id=240085
Other languages:
Log in to make links between pages The page last changed on Wed Mar 28 16:44:00 EDT 2007 by kukeltje