Bug 777983 (SOA-512) - DB schema tool assumes that only H2/HSQLDB are in use before running tool
Summary: DB schema tool assumes that only H2/HSQLDB are in use before running tool
Keywords:
Status: CLOSED NEXTRELEASE
Alias: SOA-512
Product: JBoss Enterprise SOA Platform 4
Classification: JBoss
Component: Tooling
Version: 4.2 CP01
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.3 GA
Assignee: Mike Brock
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-04-09 19:56 UTC by Len DiMaggio
Modified: 2013-06-17 05:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
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-28 08:05:24 UTC
Type: Feature Request


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 778101 0 high CLOSED Management console doesn't work with MySQL 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 778190 0 urgent CLOSED The schema tool is broken for files when multiple changes as required 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 778377 0 high CLOSED DB schema tool assumes that only H2/HSQLDB are in use before running tool 2021-02-22 00:41:40 UTC
Red Hat Issue Tracker SOA-512 0 None None None Never

Internal Links: 778101 778190 778377

Description Len DiMaggio 2008-04-09 19:56:51 UTC
Affects: Release Notes
Date of First Response: 2008-05-30 01:10:27
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 Joshua Wulf 2008-05-30 05:10:27 UTC
https://engineering.redhat.com/docbot/en-US/JBoss_SOA_Platform/4.2/html/SOA_Getting_Started_Guide/SOA_Getting_Started_Guide-Post_Installation_Testing_and_Starting.html#id3012939

"In the <install-directory>/jboss-as/tools/schema directory you will find a set of scripts that will reconfigure the main components of the platform to use the supported database of your choice.

These scripts expect the platform to be in the out-of-the-box configuration. If you wish to change the database configuration a second time you must first delete the deployed -ds.xml file for the datasource that you previously configured. This file is found in the server/production/deploy directory."

Comment 2 Jiri Pechanec 2008-06-17 12:47:32 UTC
This solution is not good enough. Unfortunately not only the new files are created but also in other files the string hsqldb is searched and then replaced by the new database - typically location of sql scripts. Thus even after this operation the reconfiguration will not work
Exmaples of such files
jbossesb.sar/esb.juddi.xml
jbpm.esb/jbpm-service.xml
jbossesb.esb/jbossesb-service.xml

And in console tool
console/management-esb/db.properties

Comment 3 Joshua Wulf 2008-06-24 01:36:43 UTC
Release noted: 

"The Getting Started Guide describes post-installation configuration of the platform databases using included scripts. These scripts expect the platform to be in the out-of-the-box, unmodified configuration. They will not work a second time."

Comment 4 Jiri Pechanec 2008-06-27 03:43:17 UTC
Link: Added: This issue related SOA-612


Comment 5 Mike Brock 2008-07-08 22:19:38 UTC
This is now fixed. However, the caveat is that if the person INITIALLY manually modified the config files, they will be unable to use the schema tool at a later date.  

If they initially used the schema tool to configure the database, they will be able to re-configure using the script after the fact.

Comment 6 Julian Coleman 2008-08-20 15:19:18 UTC
Link: Added: This issue related SOA-695


Comment 7 nwallace 2008-09-25 19:59:20 UTC
Link: Added: This issue related SOA-860


Comment 8 Dana Mison 2008-09-26 01:22:33 UTC
Clarification required for documentation:

"if the person INITIALLY manually modified the config files, they will be unable to use the schema tool at a later date. "

what config files are being refered to here?

Comment 9 Jiri Pechanec 2008-10-28 08:05:24 UTC
Verified in GA


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