11 Replies Latest reply on Aug 28, 2007 2:58 AM by Ilpo Martikainen

    ESB 4.2 with Oracle

    HAMMAM Mounir Newbie

      Hi all,

      I want to run JBossESB 4.2 using oracle database instead of hsqldb.

      I change jboss-service.xml under jbossesb.sar/META-INF by replacing all call of hsqldb by oracle.

      But i have the following problem when i run my app :

      19 juil. 07 12:51:11, INFO ?:?:? Using the Context ClassLoader
      19 juil. 07 12:51:11, INFO ?:?:? Using JNDI to aquire a JDBC DataSource with name: java:/juddiDB
      19 juil. 07 12:51:11, WARN org.jboss.soa.esb.listeners.lifecycle.AbstractManagedLifecycle:initialise:135 Unexpected exception caught while initialisation
      java.lang.reflect.UndeclaredThrowableException
       at $Proxy52.registerEPR(Unknown Source)
       at org.jboss.soa.esb.listeners.RegistryUtil.register(RegistryUtil.java:138)
       at org.jboss.soa.esb.listeners.message.MessageAwareListener.doInitialise(MessageAwareListener.java:212)
       at org.jboss.soa.esb.listeners.lifecycle.AbstractManagedLifecycle.initialise(AbstractManagedLifecycle.java:125)
       at org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController.initialiseInstances(ManagedLifecycleController.java:164)
       at org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController.start(ManagedLifecycleController.java:80)
       at org.jboss.soa.esb.listeners.config.JBoss4ESBDeployment.startService(JBoss4ESBDeployment.java:79)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
       at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
       at $Proxy0.start(Unknown Source)


      thanks in advance

        • 1. Re: ESB 4.2 with Oracle
          Kurt Stam Master

          Did you also update the settings in the datasource for juddi in jbossesb.sar/juddi-ds.xml?

          --Kurt

          • 3. Re: ESB 4.2 with Oracle
            Kurt Stam Master

            OK let me try it myself and record my steps. --Kurt

            • 4. Re: ESB 4.2 with Oracle
              HAMMAM Mounir Newbie

              Hi,

              What is the result of your tests ? do you have the same problem like me ?

              Thanks

              • 5. Re: ESB 4.2 with Oracle
                Kurt Stam Master

                :). I was just creating the schema. So sit tight for little bit longer. --thx Kurt

                • 6. Re: ESB 4.2 with Oracle
                  Kurt Stam Master

                  Here are the steps that worked for me:


                  1. Open the enterprise management console
                  Create use juddi/juddi (roles connect, dba, resource)
                  Create juddi tablespace
                  Create schema juddi

                  2. I'm going the manual way for now so I can go step-by-step.
                  Start a sql-plus where my oracle "create_database.sql" is.
                  run: @create_database.sql
                  Check that all the tables are in the juddi schema (ok)

                  Add a the jboss publisher:

                  INSERT INTO PUBLISHER (PUBLISHER_ID,PUBLISHER_NAME,EMAIL_ADDRESS,IS_ENABLED,IS_ADMIN,MAX_SERVICES_PER_BUSINESS,MAX_BINDINGS_PER_SERVICE,MAX_BUSINESSES,MAX_TMODELS)
                  VALUES ('jbossesb','JBoss ESB User','jbossesb@jboss.com','true','true',25,20,10,100);

                  commit; (don't forget)

                  Note that the insert_publisher as checked in does not do very much.. I will fix that.

                  3. I'm using JBossESB4.2MR3, unzipped to the root of my file system.
                  I'm starting it once to make sure it's working ok, using hsqldb
                  this fails.. Oracle tns listener has grabbed port 8080. So in the OEMC I'm changing
                  XML Database > Configuration > http-port from 8080 to 18080. This time the esb
                  starts without problems, and I shut it back down.

                  4. Update C:\jbossesb-server-4.2.MR3\server\default\deploy\jbossesb.sar\META-INF\jboss-service.xml
                  replacing 'hsqldb' with 'oracle'. This so that it automatically do what we manually did under 2,
                  but since the db is already there it won't execute it this time.

                  Update C:\jbossesb-server-4.2.MR3\server\default\deploy\jbossesb.sar\juddi-ds.xml

                  I'm using the thin driver and so mine looks like:

                  <datasources>
                  <local-tx-datasource>
                  <jndi-name>juddiDB</jndi-name>
                  <connection-url>jdbc:oracle:oci:@orcl_localhost</connection-url>
                  <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
                  <user-name>juddi</user-name>
                  <password>juddi</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>
                  </datasources>

                  Add the oracle driver (ojdbc14.jar) to server/default/lib


                  5. Starting up jbossesb-4.2.MR3. I'm seeing 2 problems:

                  5.1 Nullable issue:

                  11:14:18,468 INFO [JDBCDataStore] Generated token 'authToken:8C676050-39F8-11DC
                  -A050-9071C67EFF9F' for user: 'jbossesb/JBoss ESB User'
                  11:14:18,750 ERROR [SaveBusinessFunction] java.sql.SQLException: ORA-01400: cann
                  ot insert NULL into ("JUDDI"."ADDRESS_LINE"."LINE")

                  11:14:18,750 ERROR [AbstractService] java.sql.SQLException: ORA-01400: cannot in
                  sert NULL into ("JUDDI"."ADDRESS_LINE"."LINE")

                  Let's make column Address_Line.Line nullable.


                  5.2 Field size issue.

                  11:17:04,359 ERROR [SaveBindingFunction] java.sql.SQLException: ORA-12899: value
                  too large for column "JUDDI"."BINDING_TEMPLATE"."ACCESS_POINT_URL" (actual: 105
                  5, maximum: 255)

                  11:17:04,359 ERROR [AbstractService] java.sql.SQLException: ORA-12899: value too
                  large for column "JUDDI"."BINDING_TEMPLATE"."ACCESS_POINT_URL" (actual: 1055, m
                  aximum: 255)

                  11:17:04,359 ERROR [JAXRRegistryImpl] Errors occurred during save.
                  11:17:04,359 WARN [ServiceController] Problem starting service jboss.esb:deploy
                  ment=jbossesb.esb

                  Let's change the size column Binding_Template.Access_point_Url from 255 to 4000.


                  Fixing these two issues in the schema should make your server start successfully:

                  11:18:50,312 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
                  11:18:50,312 INFO [Server] JBoss (MX MicroKernel) [4.2.0.GA (build: SVNTag=JBos
                  s_4_2_0_GA date=200705111440)] Started in 27s:984ms



                  Please let us know if that worked for you.

                  --Kurt

                  • 7. Re: ESB 4.2 with Oracle
                    Kurt Stam Master

                    Small correction. I did used thin drive (not oci) and my judd-ds.xml datasource is:


                    <?xml version="1.0" encoding="UTF-8"?>

                    <datasources>
                    <local-tx-datasource>
                    <jndi-name>juddiDB</jndi-name>
                    <connection-url>jdbc:oracle:thin:@localhost:1521:orcl</connection-url>
                    <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
                    <user-name>juddi</user-name>
                    <password>juddi</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>
                    </datasources>


                    • 8. Re: ESB 4.2 with Oracle
                      Kurt Stam Master

                       

                      <?xml version="1.0" encoding="UTF-8"?>
                      
                      <datasources>
                       <local-tx-datasource>
                       <jndi-name>juddiDB</jndi-name>
                       <connection-url>jdbc:oracle:thin:@localhost:1521:orcl</connection-url>
                       <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
                       <user-name>juddi</user-name>
                       <password>juddi</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>
                      </datasources>
                      


                      • 9. Re: ESB 4.2 with Oracle
                        HAMMAM Mounir Newbie

                        Hi,

                        Yes it works correctly after changes.

                        Thank you

                        • 10. Re: ESB 4.2 with Oracle
                          Mohit Trivedi Newbie

                          Hi,

                          I wanted to achieve the same results i.e. to get JBossESB 4.2 MR3 to work with Oracle as jUDDI database. I followed the exact steps as suggested by Kurt, but I get the following exception on startup.

                          2007-08-27 15:05:04,888 INFO [org.apache.juddi.util.jdbc.ConnectionManager] Using JNDI to aquire a JDBC DataSource with name: java:/juddiDB
                          2007-08-27 15:05:05,263 DEBUG [org.jboss.soa.esb.listeners.config.JBoss4ESBDeployment] Starting failed jboss.esb:deployment=jbossesb.esb
                          org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException: Unexpected error during registration for epr EPR: PortReference < <wsa:Address jms://localhost/queue/DeadMessageQueue/>, <wsa:ReferenceProperties jbossesb:destination-type : queue/>, <wsa:ReferenceProperties jbossesb:specification-version : 1.1/>, <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFactory/> >
                          at org.jboss.soa.esb.listeners.message.MessageAwareListener.doInitialise(MessageAwareListener.java:217)
                          at org.jboss.soa.esb.listeners.lifecycle.AbstractManagedLifecycle.initialise(AbstractManagedLifecycle.java:132)
                          at org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController.initialiseInstances(ManagedLifecycleController.java:166)
                          at org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController.start(ManagedLifecycleController.java:82)
                          at org.jboss.soa.esb.listeners.config.JBoss4ESBDeployment.startService(JBoss4ESBDeployment.java:79)
                          at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
                          at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
                          at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
                          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                          at java.lang.reflect.Method.invoke(Method.java:585)
                          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                          at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                          at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
                          at $Proxy0.start(Unknown Source)
                          at org.jboss.system.ServiceController.start(ServiceController.java:417)
                          at org.jboss.system.ServiceController.start(ServiceController.java:435)
                          at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                          at java.lang.reflect.Method.invoke(Method.java:585)
                          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                          at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                          at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                          at $Proxy4.start(Unknown Source)
                          at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
                          at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                          at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
                          at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                          at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                          at java.lang.reflect.Method.invoke(Method.java:585)
                          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                          at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                          at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                          at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                          at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                          at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                          at $Proxy9.deploy(Unknown Source)
                          at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
                          at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
                          at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
                          at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
                          at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
                          at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
                          at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
                          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                          at java.lang.reflect.Method.invoke(Method.java:585)
                          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                          at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                          at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
                          at $Proxy0.start(Unknown Source)
                          at org.jboss.system.ServiceController.start(ServiceController.java:417)
                          at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                          at java.lang.reflect.Method.invoke(Method.java:585)
                          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                          at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                          at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                          at $Proxy4.start(Unknown Source)
                          at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
                          at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                          at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                          at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                          at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
                          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                          at java.lang.reflect.Method.invoke(Method.java:585)
                          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                          at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                          at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                          at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                          at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                          at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                          at $Proxy5.deploy(Unknown Source)
                          at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
                          at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
                          at org.jboss.Main.boot(Main.java:200)
                          at org.jboss.Main$1.run(Main.java:508)
                          at java.lang.Thread.run(Thread.java:595)
                          Caused by: org.jboss.soa.esb.services.registry.RegistryException
                          at org.jboss.internal.soa.esb.services.registry.RegistryService$1.invoke(RegistryService.java:62)
                          at $Proxy19.registerEPR(Unknown Source)
                          at org.jboss.soa.esb.listeners.RegistryUtil.register(RegistryUtil.java:138)
                          at org.jboss.soa.esb.listeners.message.MessageAwareListener.doInitialise(MessageAwareListener.java:212)
                          ... 98 more
                          Caused by: org.jboss.soa.esb.services.registry.RegistryException
                          at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.registerEPR(JAXRRegistryImpl.java:251)
                          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                          at java.lang.reflect.Method.invoke(Method.java:585)
                          at org.jboss.internal.soa.esb.services.registry.RegistryService$1.invoke(RegistryService.java:60)
                          ... 101 more
                          Caused by: java.lang.NullPointerException
                          at org.apache.ws.scout.registry.infomodel.ClassificationImpl.setClassificationScheme(ClassificationImpl.java:103)
                          at org.apache.ws.scout.registry.LifeCycleManagerImpl.createClassification(LifeCycleManagerImpl.java:198)
                          at org.apache.ws.scout.registry.LifeCycleManagerImpl.createClassification(LifeCycleManagerImpl.java:210)
                          at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findService(JAXRRegistryImpl.java:463)
                          at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.registerEPR(JAXRRegistryImpl.java:187)
                          ... 106 more



                          Any guidance will be of great help.

                          Thanks,
                          Mohit

                          • 11. Re: ESB 4.2 with Oracle
                            Ilpo Martikainen Newbie

                            I have little Oracle problem too. I'am trying to use Oracle 10g, but there is some problems with esb console.
                            Console needs transformationresourceparameter and transformationresourceparameterspec tables which names are a bit too long (tablename length limited into 30 characters). Any solutions or workarounds? Or 'don't use Oracle'?

                            Thanks, imartika