DFWikiLABS.org is running JBoss jBPM review
Nov 23

This post is a how-to with the necessary steps to install jBPM 3.2.2 on a Apache Tomcat 5.5 and MySQL 5.0.

  1. Create schema and table in database
    In this example a schema 'jbpm' with a user 'jboss' is used.
    Generate all jBPM tables using the script jbpm.jpdl.mysql.sql. If you want your users/roles information (the identity components) also from the MySQL db, use the second sql script attached here mysql.identity.script.jbpm321.sql to set up the necessary tables and fill them with the demo values.
  2. Prepare your jBPM archive
    1. Open a console in jbpm-jpdl-3.2.2/deploy and run:
      ant customize.console.for.tomcat
    2. This builds a jbpm-console.war in jbpm-jpdl-3.2.2/deploy/customized
    3. Unzip this file and change jbpm-console/WEB-INF/classes/hibernate.cfg.xml to reflect the following changes:
      <hibernate-configuration>
        <session-factory>
      
          <!-- hibernate dialect -->
          <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
      
          <!-- JDBC connection properties (begin) -->
          <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
          <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jbpm</property>
          <property name="hibernate.connection.username">jboss</property>
          <property name="hibernate.connection.password">jboss</property>
           <!-- JDBC connection properties (end) -->
      
          <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
      
          <!-- DataSource properties (begin) ==
          <property name="hibernate.connection.datasource">java:/JbpmDS</property>
          == DataSource properties (end) -->
          <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>
      ...
    4. Note that the following line is commented:
          <property name="hibernate.connection.datasource">java:/JbpmDS</property>
    5. Extract el-api.jar and el-ri.jar from the original war file (jbpm-console.war/WEB-INF/lib) to jbpm-console/WEB-INF/lib
    6. Copy jboss-j2ee.jar and commons-collections.jar to jbpm-console/WEB-INF/lib. You can find these files in jbpm-jpdl-3.2.2/server/server/jbpm/lib
    7. Download mysql jdbc driver from MySQL Home Page and move it to $TOMCAT_HOME/common/lib
    8. Zip jbpm-console to a war file and move it to $TOMCAT_HOME/webapps
  3. Setup a JDBC Realm in Tomcat
    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/jbpm"
	connectionName="jboss"
	connectionPassword="jboss"
	userTable="JBPM_ID_USER u, JBPM_ID_MEMBERSHIP m, JBPM_ID_GROUP g"
	userNameCol="g.TYPE_ = 'security-role' AND m.GROUP_ = g.ID_ AND m.USER_ = u.ID_ AND u.NAME_"
	userCredCol="DISTINCT u.PASSWORD_"
	userRoleTable="JBPM_ID_USER u, JBPM_ID_MEMBERSHIP m, JBPM_ID_GROUP g"
	roleNameCol="g.NAME_" />
</Context>

Now you should be able to run jBPM default web app in Tomcat.

jBPM Console

This how-to is a resume and an adaptation of JBoss.com Wiki. Sql scripts are also the same of the original page.

Related Posts

14 Responses to “Installing JBoss jBPM 3.2.2 on Apache Tomcat 5.5 and MySQL”

  1. celpjefscycle Says:

    Thanks for information.
    many interesting things
    Celpjefscylc

  2. Gaurav Sethi Says:

    Hi,
    I have done all the steps as mentioned. As soon as I add jbpm-console.xml in /$CATALINA_HOME/conf/Catalina/localhost, I get an error saying Context path required.
    Error deploying configuration descriptor jbpm-console.xml

    Please help out.

  3. pigui Says:

    I’m sorry Gaurav, I never got this error.

  4. inforium Says:

    when i enter url: http://ntanh:8085/jbpm-console
    have error:
    Unexpected error forwarding to login page
    javax.servlet.ServletException: Servlet.init() for servlet Faces Servlet threw exception
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1180)
    at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:791)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:660)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:
    469)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
    at org.apache.catalina.authenticator.FormAuthenticator.forwardToLoginPage(FormAuthenticator.
    java:316)
    at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:2
    44)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:491)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Htt
    p11BaseProtocol.java:665)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.ja
    va:81)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
    at java.lang.Thread.run(Thread.java:595)

    please help me!

  5. pigui Says:

    Did you configured JDBC realm correctly? Try to run jbpm-console using database admin account.

    If it not works, problem might be elsewhere (Tomcat or JSF config).

    ps: MySQL is at localhost? You have to configure it to allow remote access…

  6. inforium Says:

    I configured JDBC realm by oracleDB 10G and used database admin account.

  7. pigui Says:

    Oracle?? buff, I never tried jBPM in Oracle… Did you follow JBoss.com instructions? http://wiki.jboss.org/wiki/Wiki.jsp?page=JbpmOnOracle

  8. Sanjar Says:

    Hi

    I am using jbpm-jpdl-suite-3.2.3

    Can’t find the el-ri.jar file on my system.

    Found the el-api.jar file in jBMP\server\server\jbpm\lib directory.

    Could you please help.

    Thanks in advance

  9. pigui Says:

    @Sanjar
    I don’t know…. I have not tried 3.2.3.
    I’m sorry

  10. Krishan Kumar Says:

    Hi

    I am using jbpm-jpdl-suite-3.2.3
    and i want to know that it is suitable for BPM process… may it be possible that some problem can occur after i adapt this version of JBPM. I mean to say, this version is perfect or i should go for lower version. (Is there any problem in this version that anybody can face when using in the midth of development.)
    Could you please help.

    mrkrishankumar@gmail.com

  11. pigui Says:

    @Krishan Kumar
    I haven’t tried version 3.2.3 but I suppose it must be more stable than 3.2.2 (and it was).

    I’ve been working in a couple of “medium” projects with it and I have no problem with it (only a learning large curve)

    I totally recommend to use it if you are planning an business application with several processes build in Java (J2EE, Struts, Spring, Hibernate, and all this kind of fancy things). PHP rulez! ;)

    I would invest a week (or a couple of weeks) trying this suite and writing a simple prototype to see if it is suitable for your project.

    In this blog, there are some development HOW-TOs about some jBPM nodes. I hope they could be useful to you, I wrote them to share with my development teammates that never worked with BPM.

    I’ll be here for any question.

  12. Victor Says:

    http://www.jboss.org/community/docs/DOC-11161

  13. madhu Says:

    hi….
    I am working on jbpm-jpdl suit 3.2.3 & my sql 5.1 at backend. I want to know how to use jbpm jpdl on mysql.

  14. pigui Says:

    @madhu

    Hi madhu,
    what do you exactly want to know?

Leave a Reply