Bug 778377 (SOA-860)

Summary: DB schema tool assumes that only H2/HSQLDB are in use before running tool
Product: [JBoss] JBoss Enterprise SOA Platform 4 Reporter: nwallace <nwallace>
Component: ToolingAssignee: Julian Coleman <jcoleman>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 4.2 CP01   
Target Milestone: ---   
Target Release: 4.2 CP03   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/SOA-860
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
/opt/CP01/soa-4.2.0.GA_CP01.CR3.zip /opt/CP01/standalone-soa-4.2.0.GA_CP01.CR3.zip
Last Closed: 2008-10-23 10:28:13 UTC Type: Feature Request
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description nwallace 2008-09-25 19:56:16 UTC
Affects: Release Notes
Date of First Response: 2008-10-23 06:28:13
project_key: SOA

We need to document the fact that, if a user decides to switch the SOA-P DB, they will have to delete the datasource files from the original DB server. If they don't do this before running the schema tool for a second time, the resulting server configuration will fail to start - this exception is raised:

2008-04-09 15:29:37,728 ERROR [org.jboss.deployment.MainDeployer] Could not create deployment: file:/opt/CP01/jboss-soa-p.4.2.0/jboss-as/server/production/deploy/oracle-ds.xml
org.jboss.deployment.DeploymentException: Trying to install an already registered mbean: jboss.jca:service=LocalTxCM,name=DefaultDS

The problem is that the tool does not delete the -ds.xml file for the previously defined DB server:

[ldimaggi@ldimaggi log]$ ls /opt/CP01/jboss-soa-p.4.2.0/jboss-as/server/production/deploy/*ds*
/opt/CP01/jboss-soa-p.4.2.0/jboss-as/server/production/deploy/hajndi-jms-ds.xml
/opt/CP01/jboss-soa-p.4.2.0/jboss-as/server/production/deploy/management-ds.xml
/opt/CP01/jboss-soa-p.4.2.0/jboss-as/server/production/deploy/mysql-ds.xml
/opt/CP01/jboss-soa-p.4.2.0/jboss-as/server/production/deploy/oracle-ds.xml

Interestingly, the error occurs only after some DB tables have been created - it fails on the HILOSEQUENCES table.

mysql> show tables;
+----------------------+
| Tables_in_soaesb1_db |
+----------------------+
| HILOSEQUENCES        | 
| JBM_COUNTER          | 
| JBM_DUAL             | 
| JBM_MSG              | 
| JBM_MSG_REF          | 
| JBM_ROLE             | 
| JBM_TX               | 
| JBM_USER             | 
| TIMERS               | 
+----------------------+
9 rows in set (0.00 sec)

This is also a feature request - at present - the tool assumes that the out-of-the-box confguration oh HSQLDB is present.

[ldimaggi@ldimaggi CP01]$ ls  /opt/CP01/jboss-soa-p.4.2.0/jboss-as/server/production/deploy/*ds*
/opt/CP01/jboss-soa-p.4.2.0/jboss-as/server/production/deploy/hajndi-jms-ds.xml
/opt/CP01/jboss-soa-p.4.2.0/jboss-as/server/production/deploy/hsqldb-ds.xml
/opt/CP01/jboss-soa-p.4.2.0/jboss-as/server/production/deploy/management-ds.xml

/opt/CP01/jboss-soa-p.4.2.0/jboss-as/tools/schema
[ldimaggi@ldimaggi schema]$ grep hsqldb * build.xml
build.xml:                <include name="hsqldb-ds.xml"/>
build.xml:                <include name="jboss-messaging.sar/hsqldb-persistence-service.xml"/>
build.xml:                <include name="jboss-messaging.sar/clustered-hsqldb-persistence-service.xml"/>
build.xml:        <reconfigure file="${target.dir}/deploy/jbossesb.sar/esb.juddi.xml" old="juddi-sql/hsqldb/"
build.xml:        <reconfigure file="${target.dir}/deploy/jbpm.esb/jbpm-service.xml" old="hsqldb.sql"
build.xml:        <reconfigure file="${target.dir}/deploy/jbossesb.esb/jbossesb-service.xml" old="message-store-sql/hsqldb/"
build.xml:        <reconfigure file="${target.dir}/deploy/jbossesb.sar/esb.juddi.xml" old="juddi-sql/hsqldb/"
build.xml:        <reconfigure file="${target.dir}/deploy/jbpm.esb/jbpm-service.xml" old="hsqldb.sql"
build.xml:                <include name="hsqldb-ds.xml"/>
build.xml:                <include name="jboss-messaging.sar/hsqldb-persistence-service.xml"/>
build.xml:                <include name="jboss-messaging.sar/clustered-hsqldb-persistence-service.xml"/>
build.xml:        <reconfigure file="${target.dir}/deploy/jbossesb.sar/esb.juddi.xml" old="juddi-sql/hsqldb/"
build.xml:        <reconfigure file="${target.dir}/deploy/jbpm.esb/jbpm-service.xml" old="hsqldb.sql"
build.xml:        <reconfigure file="${target.dir}/deploy/jbossesb.esb/jbossesb-service.xml" old="message-store-sql/hsqldb/"
build.xml:        <reconfigure file="${target.dir}/deploy/jbossesb.sar/esb.juddi.xml" old="juddi-sql/hsqldb/"
build.xml:        <reconfigure file="${target.dir}/deploy/jbpm.esb/jbpm-service.xml" old="hsqldb.sql"

Comment 1 nwallace 2008-09-25 19:56:16 UTC
Link: Added: This issue related SOA-612


Comment 2 nwallace 2008-09-25 19:56:17 UTC
Link: Added: This issue related SOA-695


Comment 3 nwallace 2008-09-25 19:59:20 UTC
Link: Added: This issue is related to SOA-512


Comment 4 nwallace 2008-09-25 19:59:54 UTC
Can we have confirmation that fixes are in place for 4.2CP03.

Comment 5 Julian Coleman 2008-10-23 10:28:13 UTC
We will not fix this for 4.2CP03.