Hide Forgot
Date of First Response: 2009-02-02 07:20:00 project_key: SOA When the server is started second and subsequent times the db initialization of jBPM fails with the following trace 06:57:46,634 WARN [ServiceController] Problem starting service jboss.esb:service=JBPMDatabaseInitializer org.h2.jdbc.JdbcSQLException: Table JBPM_ACTION already exists [42101-68] at org.h2.message.Message.getSQLException(Message.java:91) at org.h2.message.Message.getSQLException(Message.java:95) at org.h2.message.Message.getSQLException(Message.java:73) at org.h2.command.ddl.CreateTable.update(CreateTable.java:112) at org.h2.command.CommandContainer.update(CommandContainer.java:69) at org.h2.command.Command.executeUpdate(Command.java:197) at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:108) at org.jboss.resource.adapter.jdbc.WrappedStatement.executeUpdate(WrappedStatement.java:239) at org.jboss.internal.soa.esb.dependencies.DatabaseInitializer.executeSql(DatabaseInitializer.java:145) at org.jboss.internal.soa.esb.dependencies.DatabaseInitializer.initDatabase(DatabaseInitializer.java:122) at org.jboss.internal.soa.esb.dependencies.DatabaseInitializer.startService(DatabaseInitializer.java: 06:57:53,336 ERROR [URLDeploymentScanner] Incomplete Deployment listing: --- MBeans waiting for other MBeans --- ObjectName: jboss.esb:service=JBPMDatabaseInitializer State: FAILED Reason: org.h2.jdbc.JdbcSQLException: Table JBPM_ACTION already exists [42101-68] I Depend On: jboss.jca:service=DataSourceBinding,name=JbpmDS Depends On Me: jboss.esb:service=JbpmService jboss.esb:deployment=jbpm.esb --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM --- ObjectName: jboss.esb:service=JBPMDatabaseInitializer State: FAILED Reason: org.h2.jdbc.JdbcSQLException: Table JBPM_ACTION already exists [42101-68] I Depend On: jboss.jca:service=DataSourceBinding,name=JbpmDS Depends On Me: jboss.esb:service=JbpmService jboss.esb:deployment=jbpm.esb In the jbpm-service.xml there is a line <attribute name="ExistsSql">select * from JBPM_ID_USER</attribute> as a detector for created database. It turns out that the identity module related tables are not created There is a change in hibernate.cfg.xml file. Instead of inlining Identity hbm's there is a reference to file <mapping resource="hibernate.extra.hbm.xml" /> <mapping resource="hibernate.identity.hbm.xml" /> The file hibernate.identity.hbm.xml is located in jbpm-identity.jar and the entity definitions are present. I see the following issues to be resolved 1) There can be an issue with classloading that causes that the identity hbm file is not located during the start 2) There can be another hibernate.cfg.xml or hibernate.identity.hbm.xml on the classpath that is not configured correctly 3) As identity module is optional (even if enabled by default) we should think if the test SQL statement should be based on the table that is not required to be present
Further analysis both 1 and 2 are incorrect, the resource mapping is read but the tables are not created from the mappings but by sql scripts. And the sql scripts does not contain SQL statemnts to create identity related tables
Following a pointer from kconner - the table creation is done using the jBPM SQL scripts. In 4.3.0 CP01, some of the scripts miss the identity module-related tables (JBPM_ID_*).
Link: Added: This issue depends JBPM-2007
Already fixed in 3.2.5 (08-Jan-2008). Why can't that release be used in the SOA platform?
Already fixed in jbpm-3.2.5
Reopened as it was incorrectly closed by Thomas Diesler. Resolved as it should be fixed in the next CP candidate which will be based on a newer version of jBPM.
This is fixed in the jBPM 3.2.5 SP branch, which we will use for SOA 4.3.0 CP01. There is no incompatibility with 4.3.0 GA, so no release note is needed.
Verified in CR2