8 Replies Latest reply on Jan 3, 2013 10:39 AM by alcarazj

    jUDDI migration to Oracle 11g assistance

    alcarazj

      I deployed  JBoss ESB 4.11 (jbossesb-4.11.zip) onto JBoss AS 6.1 (6.1.0.Final).

       

      Now, I am migrating the JBoss ESB jUDDI registry to Oracle 11g.I have a juddiv3 database just created by the DBA. I have the server name, SID, user ID and password for it.

       

      I have:

      1. Added the classes12.jar oracle driver to ServerName/lib.

      2. Edited the persistence.xml to <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>

      3. Created a oracle-ds.xml and dropped it under ServerName/deploy.

      4. Created juddi_sequence (orm.xml) file using the "Oracle Sequence name" example in chapter 11.3 jUDDI User Guide

      5. Started JBoss with errors and WARN messages along the way.

       

      09:15:46,406 WARN  [org.hibernate.util.DTDEntityResolver] recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!

      ......

      09:15:49,592 ERROR [org.hibernate.util.xml.ErrorLogger] Error parsing XML (5) : cvc-complex-type.3.1: Value '1.0' of attribute 'version' of element 'entity-mappings' is not valid with respect to the corresponding attribute use. Attribute 'version' has a fixed value of '2.0'

      ......

      ERROR [ProfileServiceBootstrap] Failed to load profile:: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

      ......

      DEPLOYMENTS MISSING DEPENDENCIES:

        Deployment "jboss.esb.vfs:///opt/jbossesb-6.1.0.Final/server/all/deploy/jbossesb.esb" is missing the following dependencies:

          Dependency "<UNKNOWN jboss.esb.vfs:///opt/jbossesb-6.1.0.Final/server/all/deploy/jbossesb.esb>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'jboss.esb:service=JuddiClient' **")

        Deployment "jboss.esb.vfs:///opt/jbossesb-6.1.0.Final/server/all/deploy/jbpm.esb" is missing the following dependencies:

          Dependency "<UNKNOWN jboss.esb.vfs:///opt/jbossesb-6.1.0.Final/server/all/deploy/jbpm.esb>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'jboss.esb:deployment=jbossesb.esb' **")

      ......

      DEPLOYMENTS IN ERROR:

        Deployment "<UNKNOWN jboss.esb.vfs:///opt/jbossesb-6.1.0.Final/server/all/deploy/slsb.esb>" is in error due to the following reason(s): ** UNRESOLVED Demands 'jboss.esb:deployment=jbossesb.esb' **

        Deployment "<UNKNOWN jboss.esb.vfs:///opt/jbossesb-6.1.0.Final/server/all/deploy/jbrules.esb>" is in error due to the following reason(s): ** UNRESOLVED Demands 'jboss.esb:deployment=jbossesb.esb' **

      ......

        Deployment "<UNKNOWN jboss.esb.vfs:///opt/jbossesb-6.1.0.Final/server/all/deploy/jbossesb.esb>" is in error due to the following reason(s): ** UNRESOLVED Demands 'jboss.esb:service=JuddiClient' **

        Deployment "<UNKNOWN jboss.esb.vfs:///opt/jbossesb-6.1.0.Final/server/all/deploy/spring.esb>" is in error due to the following reason(s): ** UNRESOLVED Demands 'jboss.esb:deployment=jbossesb.esb' **

       

              at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1228) [:2.2.2.GA]

              at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:905) [:2.2.2.GA]

              at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:87) [:6.1.0.Final]

              at org.jboss.profileservice.deployment.ProfileDeployerPluginRegistry.checkAllComplete(ProfileDeployerPluginRegistry.java:107) [:0.2.2]

              at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:135) [:6.1.0.Final]

              at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.1.0.Final]

              at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]

              at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]

              at java.lang.Thread.run(Thread.java:662) [:1.6.0_29]

       

      09:15:52,239 INFO  [org.apache.coyote.http11.Http11Protocol] Starting Coyote HTTP/1.1 on http-jsoa-sals02%2F10.2.180.99-8080

      09:15:52,245 INFO  [org.apache.coyote.ajp.AjpProtocol] Starting Coyote AJP/1.3 on ajp-jsoa-sals02%2F10.2.180.99-8009

      09:15:52,248 INFO  [org.apache.coyote.http11.Http11Protocol] Starting Coyote HTTP/1.1 on http-jsoa-sals02%2F10.2.180.99-8443

      09:15:52,249 INFO  [org.jboss.bootstrap.impl.base.server.AbstractServer] JBossAS [6.1.0.Final "Neo"] Started in 1m:21s:61ms

       

      JBoss start okay; but, ESB and registry extensions does not.

       

      Does anyone have any better instructions on how to migrate to an Oracle 11g database?

        • 1. Re: jUDDI migration to Oracle 11g assistance
          tcunning

          Juan,

           

          Here's the steps I'd take :

           

          1. Add the JDBC driver to <serverprofile>/lib

          2. Edit jbossesb-registry.sar/juddi_config/META-INF/persistence.xml and change the hibernate dialect

          3. Edit jbossesb-registry.sar/juddi-ds.xml - change the connection, the driver, and change the SqlFiles portion to use the oracle creation script

           

                <attribute name="SqlFiles">

                   juddi-sql/oracle9/import.sql

                </attribute>

           

          I think you're missing the import script mentioned here if you created your own datasource xml.

          • 2. Re: jUDDI migration to Oracle 11g assistance
            alcarazj

            Yes, I created my own data source file. I have to be doing something here, specifically under the mbean definition. I do need an mbean around the attribute, correct?

             

            This is how my data source looks like. What am I doing wrong here?

             

            <datasources>

            <local-tx-datasource>

                <jndi-name>juddiDB</jndi-name>

                <connection-url>jdbc:oracle:thin:@servername:port:sid</connection-url>

                <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>

                <user-name>username</user-name>

                <password>password</password>

                <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>

                <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>

                <min-pool-size>5</min-pool-size>

                <max-pool-size>100</max-pool-size>

                  <metadata>

                     <type-mapping>Oracle9i</type-mapping>

                  </metadata>

                <depends>jboss:service=Oracle,database=juddiDB</depends>

            </local-tx-datasource>

             

               <mbean code="oracle.jdbc.driver.OracleDriver"

                    name="jboss:service=Oracle,database=juddiDB">

                    <attribute name="Database">juddiDB</attribute>

                    <attribute name="InProcessMode">true</attribute>

               </mbean>

               <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/oracle9/import.sql

                  </attribute>

                  <depends>jboss.jca:service=DataSourceBinding,name=juddiDB</depends>

               </mbean>

             

            </datasources>

             

            Thanks.

            • 3. Re: jUDDI migration to Oracle 11g assistance
              tcunning

              If you are putting your datasource within deploy like you said, I don't know how it is going to find juddi-sql/oracle9/import.sql.

              • 4. Re: jUDDI migration to Oracle 11g assistance
                alcarazj

                Yes, but it is not at the root of the deploy folder.

                 

                The datasource is under /profilename/deploy/jbossesb-registry.sar/juddi-ds.xml and juddi-sql/oracle9/import.sql is at the same level as juddi-ds.xml (/profilenam/deploy/jbossesb-registry.sar/juddi-sql/oracle9/import.sql).

                 

                Would that be okay in this case?

                • 5. Re: jUDDI migration to Oracle 11g assistance
                  tcunning

                  Juan,

                   

                  Why not just edit juddi-ds.xml rather than create a new DS?

                   

                  I'm not sure what's going on - I would go through your server/<profilename>/log/server.log and search for an exception because I'm thinking there's one there that you haven't seen in the console, maybe because it scrolled by so fast.        Just tested the steps I posted above by changing my jboss-6.1.0.Final + jbossesb to mysql, which worked fine.

                  • 6. Re: jUDDI migration to Oracle 11g assistance
                    alcarazj

                    I have modified the existing data source as shown below; but, I am getting stuck "Removing bootstrap log handlers" (i.e.  11:55:40,390 INFO  [service] Removing bootstrap log handlers). Although, the everything seems to be working fine.

                     

                    <datasources>

                       <local-tx-datasource>

                             <jndi-name>juddiDB</jndi-name>

                             <connection-url>jdbc:oracle:thin:@servername:port:SID</connection-url>

                             <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>

                             <user-name>userID</user-name>

                             <password>password</password>

                             <min-pool-size>5</min-pool-size>

                             <max-pool-size>20</max-pool-size>

                             <idle-timeout-minutes>0</idle-timeout-minutes>

                             <prepared-statement-cache-size>32</prepared-statement-cache-size>

                       </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/oracle9/import.sql

                          </attribute>

                          <depends>jboss.jca:service=DataSourceBinding,name=juddiDB</depends>

                       </mbean>

                    </datasources>

                      

                     

                    Note: I have removed the following mbean as I didn’t think; it would fulfill any purpose here.

                     

                        <mbean code="org.jboss.jdbc.HypersonicDatabase"

                            name="jboss:service=Hypersonic,database=juddiDB">

                            <attribute name="Database">juddiDB</attribute>

                            <attribute name="InProcessMode">true</attribute>

                       </mbean>

                     

                     

                    Why would the startup get caught there?

                     

                    Thanks.

                    • 7. Re: jUDDI migration to Oracle 11g assistance
                      tcunning

                      Juan,

                       

                      When you say the startup "gets caught", what do you mean exactly?      Does it freeze and seem to go no farther?     Is there an exception?     Do you see anything suspicious in the server.log?

                       

                      I think you're safe to leave that mbean config in the ds.xml - I do it all the time - even though it refers by name to Hypersonic and you are using Oracle.

                      • 8. Re: jUDDI migration to Oracle 11g assistance
                        alcarazj

                        Tom,

                         

                        It just freezes and seems to go no further. In other words, it never gets to the step, where it normally says, JBoss started in so many minutes and seconds. I simply hit the Enter key and move on. There is no exception either. I also added the hypersonic mbean back into the ds.xml configuration; but, no change.

                         

                        Although, I see a bunch of HornetQ queue messages "There are more than one servers on the network broadcasting the same node id", which I need to tackle next. And, yes I do have two ESB servers running and using the 'all' profile.

                         

                        Would this be why?

                         

                        Thanks.