Bug 779852 (SOA-2212)

Summary: schema tool missing mbean and producing invalid configuration Persistence
Product: [JBoss] JBoss Enterprise SOA Platform 5 Reporter: Brad Maxwell <bmaxwell>
Component: unspecifiedAssignee: Julian Coleman <jcoleman>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 5.0.2   
Target Milestone: ---   
Target Release: 5.1.0.ER2   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/SOA-2212
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-02-10 15:22:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Brad Maxwell 2010-08-09 14:31:21 UTC
Help Desk Ticket Reference: https://access.redhat.com/issue-tracker/1002453
project_key: SOA

$JBOSS_HOME/tools/schema/build.xml - is leaving out that MBean in $JBOSS_HOME/server/$PROFILE/deploy/jbossesb-registry.sar/juddi-ds.xml

The tool replaces the juddi-ds.xml with the new datasource, however there is an MBean in the original juddi-ds.xml (DatabaseInitializer).  This MBean is left out and causes SOA to not start.  Note the MBean has a database specific configuration (juddi-sql/postgres/import.sql) which should be set to the appropriate db value.

<?xml version="1.0" encoding="UTF-8"?>
<datasources>
  <local-tx-datasource>
....
  </local-tx-datasource>

<mbean code="org.jboss.internal.soa.esb.dependencies.DatabaseInitializer"
      name="jboss.esb:service=JUDDIDatabaseInitializer">
      <attribute name="Datasource">java:/juddiDB</attribute>
      <attribute name="ExistsSql">select count(*) from  j3_publisher</attribute>
      <attribute name="SqlFiles">
        juddi-sql/postgres/import.sql
      </attribute>
      <depends>jboss.jca:service=DataSourceBinding,name=juddiDB</depends>
   </mbean>


</datasources>



juddi_config/META-INF/persistence.xml 

It capitalized the P in the opening tag of Persistence, and the closing tag was a lowercase p.
<Persistence xmlns="http://java.sun.com/xml/ns/persistence" 

It should be <persistence ...</persistence>

Comment 1 Julian Coleman 2010-09-09 08:56:25 UTC
Link: Added: This issue related SOA-2267


Comment 2 Julian Coleman 2010-09-09 11:09:27 UTC
I cannot reproduce the capitalised 'P' in .../juddi_config/META-INF/persistence.xml
with the 5.1.0 ER1 build.  The original file contains a lower-case 'p' and the text
substitution done by the schema tool should not alter this.

Comment 3 Julian Coleman 2010-09-09 11:11:03 UTC
Resolved with revision 6486 of:
  build-tools/schema-tool/juddi-service.xml
  build-tools/schema-tool/build.xml

Commit message:
  SOA-2212
  SOA-2267
  In build.xml, do not create a separate:
    .../deploy/jbossesb-registry.sar/META-INF/juddi-service.xml
  file but merge in the contents of the schema tool juddi-service.xml to:
    .../deploy/jbossesb-registry.sar/juddi-ds.xml 
  
  The schema tool juddi-service.xml now only contains the mbean template and is
  no longer a complete XML file.

  Tested by Jiri Sedlacek.


Comment 4 Jiri Sedlacek 2011-02-10 15:22:06 UTC
verified in 5.1.0.ER9