Bug 778689 (SOA-1157) - jBPM identity module is not initilized and jBPM db initializations fails as the result
Summary: jBPM identity module is not initilized and jBPM db initializations fails as t...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: SOA-1157
Product: JBoss Enterprise SOA Platform 4
Classification: JBoss
Component: Configuration, Deployment
Version: 4.3 CP01
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 4.3 CP01
Assignee: Julian Coleman
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-02-02 06:11 UTC by Jiri Pechanec
Modified: 2009-02-17 09:30 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
CR1
Last Closed: 2009-02-17 09:30:57 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SOA-1157 0 None None None Never

Description Jiri Pechanec 2009-02-02 06:11:15 UTC
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

Comment 1 Jiri Pechanec 2009-02-02 11:45:56 UTC
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

Comment 2 Julian Coleman 2009-02-02 12:20:00 UTC
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_*).


Comment 3 Julian Coleman 2009-02-02 13:19:11 UTC
Link: Added: This issue depends JBPM-2007


Comment 4 Thomas Diesler 2009-02-02 14:07:01 UTC
Already fixed in 3.2.5 (08-Jan-2008). Why can't that release be used in the SOA platform?

Comment 5 Thomas Diesler 2009-02-03 11:14:08 UTC
Already fixed in jbpm-3.2.5

Comment 6 Mark Little 2009-02-03 11:26:26 UTC
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.

Comment 8 Julian Coleman 2009-02-06 10:36:44 UTC
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.

Comment 9 Jiri Pechanec 2009-02-17 09:30:57 UTC
Verified in CR2


Note You need to log in before you can comment on or make changes to this bug.