[jboss-user] [jBPM Users] - Re: jbpm 4.1 installation problems on jboss 4.2.3

pbaltz do-not-reply at jboss.com
Wed Sep 30 11:41:39 EDT 2009

A little more background on this.  I managed to get it working on 4.2.3.

I looked into the jBPM source code where the exception related to looking up JbpmDS was coming from, and it looks like jBPM only tries to lookup the datasource in JNDI once.  On subsequent calls, it checks if an exception was thrown previously, and if one was thrown earlier, it won't even try to lookup the datasource.

The problem is caused by jBPM running as a service in the microcontainer which apparently gets started very early on in the JBoss boot process.  The exception occurs, and jBPM is dead in the water way before JbpmDS gets bound by JBoss.

I did find a work-around though.  You can modify the jBPM hibernate configuration to use JDBC directly to avoid this.  Just change your jbpm.hibernate.cfg.xml to something like the following (which uses HSQL):

  | <?xml version="1.0" encoding="utf-8"?>
  | <!DOCTYPE hibernate-configuration PUBLIC
  |           "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
  |           "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
  | <hibernate-configuration>
  |     <session-factory>
  |         <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
  |     <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
  |     <property name="hibernate.connection.url">jdbc:hsqldb:hsql://opus.workpc.tds.net:1701</property>
  |     <property name="hibernate.connection.username">sa</property>
  |     <property name="hibernate.connection.password"></property>
  |     <property name="hibernate.format_sql">true</property>
  |         <mapping resource="jbpm.repository.hbm.xml" />
  |         <mapping resource="jbpm.execution.hbm.xml" />
  |         <mapping resource="jbpm.history.hbm.xml" />
  |         <mapping resource="jbpm.task.hbm.xml" />
  |         <mapping resource="jbpm.identity.hbm.xml" />
  |     </session-factory>
  | </hibernate-configuration>

I think this should be okay for most people, since jBPM should be the only thing talking to that database directly.  The other option I saw that looked like a possibility was bootstrapping the datasource into JNDI as a microcontainer bean which can be seen in other forum posts, but I haven't tried it myself.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4257890#4257890

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4257890

More information about the jboss-user mailing list