JBossWiki : JbpmOnTomcatOracle
Wiki Home: JbpmOnTomcatOracle [EN]
[Permalink]
[Recent Changes]
[History]
[RSS Feed][RDF Feed][Atom Feed][Print]

Your trail: JbpmOnTomcatOracle

This how-to outlines the necessary steps to get jBPM 3.2 working with Tomcat 5.5 and Oracle 10g Express Edition 10.2.0 xe



It has been tested with the following environment:
Tomcat 5.5.20
Oracle Express Edition 10g xe
jBPM 3.2.GA

1. Create schema and tables in Oracle 10g express edition (xe)

- create a new user (jbpm) and assign a schema jbpm with the good rights on the database

- connect with this user

- Run the oracle script jbpm-jpdl-3-suite.2.GA\db\jbpm.jpdl.oracle.sql in sqlplus console.

All the steps i did with the oracle webapp oracle webapp , it works very well...

2. Prepare your jBPM archive

- download the jbpm-jpdl-suite-3.2.GA.zip (extract)

- copy the war file jbpm-jpdl-3.2.GA\deploy\jbpm-console.war in $CATALINA_HOME\webapps\ (you can decompress the file by yourself/launch tomcat the first time it will decompress the file automatically and delete the war file)

- modify the hibernate.cfg.xml in the $CATALINA_HOME\webapps\jbpm-console\WEB-INF\classes file (you can also find the file in the config directory in jbpm-jpdl-3.2.GA\config)

These the part of hibernate.cfg.xml i have modified

 <!-- SQL dialect -->
    <property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>	

 <!-- JDBC connection properties (begin) -->
    <property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
    <property name="hibernate.connection.url">jdbc:oracle:thin:@localhost:1521:xe</property>
    <property name="hibernate.connection.username">jbpm</property>
    <property name="hibernate.connection.password">jbpm</property>
 <!-- JDBC connection properties (end) -->

 <!-- JTA transaction properties (begin) -->
 <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>


- copy all the librairies in jbpm-jpdl-3.2.GA\lib\*.jar in my $CATALINA_HOME\webapps\jbpm-console\WEB-INF\lib

- Don't forget to copy the ojdb14.jar (oracle driver) in $CATALINA_HOME\webapps\jbpm-console\WEB-INF\lib
You can find the drivers here => Oracle jdbc driver or in you oracle database 10 g express edition

3. Setup a User in Context Tomcat

3.1 Tomcat user authentication


- jBPM specific users and roles in $CATALINA_HOME/conf/tomcat-users.xml

...
  <role rolename="manager"/>
  <role rolename="admin"/>
  <role rolename="participant"/>

  <user username="ernie" password="ernie" roles="participant,manager,administrator"/>
  <user username="bert" password="bert" roles="participant"/>
...


By default, it use the tomcat user authentication. Nevertheless, you can setup user with the database.

3.2 User database (JDBC Realm in Tomcat based on Jbpm On Tomcat - Real Context )

- Create a file jbpm-console.xml in $CATALINA_HOME/conf/Catalina/localhost similar to

<Context>
<Realm  className="org.apache.catalina.realm.JDBCRealm" 
	driverName="com.mysql.jdbc.Driver"
	connectionURL="jdbc:mysql://localhost:3306/jbpm32"
	connectionName="jbossjbpm" 
	connectionPassword="jbossjbpm"
	userTable="JBPM_ID_USER" 
	userNameCol="NAME_" 
	userCredCol="PASSWORD_"
	userRoleTable="JBPM_ID_MEMBERSHIP" 
	roleNameCol="ROLE_" />
</Context>	

- Run the sql script for update oracle database

update jbpm_id_membership j
set j.NAME_ = (SELECT u.NAME_ from jbpm_id_user u where j.USER_ = u.ID_)


update jbpm_id_membership j
set j.ROLE_ = (SELECT g.NAME_ from jbpm_id_group g where j.GROUP_ = g.ID_)

And for populate the database => Use Hibernate ToCreate Jbpm DB - Run the task (method) loadEntities and comment the line in CreateDb?.java << dbp.createSchema() >> if the database already exist.

4. Finish


- run tomcat and connect to http://localhost:8080/jbpm-console

Note : Now you should be able to run jBPM default web app in Tomcat and login with the username/password from tomcat-users.xml (ernie/ernie will work).

This is the original post in the jbpm forum => Tomcat 5.5 - Jbpm 3.2 - Starting failed


Other languages:

Log in to make links between pages

The page last changed on Mon Apr 02 13:09:35 EDT 2007 by hipchic