6 Replies Latest reply on Feb 9, 2007 5:58 AM by ashish_rajhans

    Installing JBossESB with MySQL

    ashish_rajhans

      On building the JBossESB installation with ant, it automatically creates hsqldb-ds.xml in my xxx/deploy directory. I am using MySQL with JBoss and hence have removed all supporting files for Hypersonic. Is it possible to get it to use MySQL instead. Changing values inside the /install/conf/jbossesb-properties.xml does not help.

        • 1. Re: Installing JBossESB with MySQL
          kurtstam

          Simply replace the hsqldb-ds.xml with the original, and add a mysql-db.xml which has the same datesource name. I'm guessing you mean for the juddi datasource.

          The db settings in the jbossesb-properties.xml are for the persistent-manager, which is not using a datasource. I don't know the exact reasons why it's not. I think it's supposed to at some point.


          --Kurt

          • 2. Re: Installing JBossESB with MySQL

            The persistence store is not, as the original design asked for. A task now is to use Hibernate. That should be in a future release.

            • 3. Re: Installing JBossESB with MySQL
              kurtstam

              Well there you go :). Oh and I forgot to mention that the mysql-ds.xml in the install/registry directory is pretty much what you want.

              • 4. Re: Installing JBossESB with MySQL
                ashish_rajhans

                I left the hsqldb driver files in there, deleted the hsqlbd-jdbc2-service.xml & hsqldb-jdbc-state-service.xml files from within the xxx/server/default/deploy/jms directory , copied the mysql-jdbc2-service.xml file to change datasourcebindingsd from DefaultDS to MySqlDS and added the StateManager part to it. It seems to deploy fine and create JMS tables on the MySQL database. JBoss starts up fine without errors. However, when I try running the quickstart program - helloworld I get the following JMX Exception -

                [echo] Basic JMS Gateway and Listener with Actions
                [java] +----------------------------------------------------------+
                [java] | |
                [java] | Starting JBossESB... |
                [java] | |
                [java] +----------------------------------------------------------+
                [java] Reading config from /opt/jbossesb/samples/quickstarts/helloworld/jbossesb.xml
                [java] 09:31:12,405 ERROR [main][ConfigurationController] Unexpected exception starting controller
                [java] org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException: Unexpected JMS error from prepareMessageReceiver
                [java] at org.jboss.soa.esb.listeners.gateway.JmsGatewayListener.doInitialise(JmsGatewayListener.java:123)
                [java] at org.jboss.soa.esb.listeners.lifecycle.AbstractManagedLifecycle.initialise(AbstractManagedLifecycle.java:120)
                [java] at org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController.initialiseInstances(ManagedLifecycleController.java:78)
                [java] at org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController.start(ManagedLifecycleController.java:35)
                [java] at org.jboss.soa.esb.listeners.config.ConfigurationController.processConfiguration(ConfigurationController.java:314)
                [java] at org.jboss.soa.esb.listeners.config.ConfigurationController.(ConfigurationController.java:120)
                [java] at org.jboss.soa.esb.listeners.StandAloneBootStrapper.initiateController(StandAloneBootStrapper.java:191)
                [java] at org.jboss.soa.esb.listeners.StandAloneBootStrapper.(StandAloneBootStrapper.java:126)
                [java] at org.jboss.soa.esb.listeners.StandAloneBootStrapper.(StandAloneBootStrapper.java:103)
                [java] at org.jboss.soa.esb.listeners.StandAloneBootStrapper.main(StandAloneBootStrapper.java:80)
                [java] Caused by: javax.jms.JMSException: This destination does not exist !QUEUE.queue/quickstart_helloworld_Request
                [java] at org.jboss.mq.server.JMSDestinationManager.createQueue(JMSDestinationManager.java:613)
                [java] at org.jboss.mq.server.JMSServerInterceptorSupport.createQueue(JMSServerInterceptorSupport.java:111)
                [java] at org.jboss.mq.server.TracingInterceptor.createQueue(TracingInterceptor.java:259)
                [java] at org.jboss.mq.server.JMSServerInvoker.createQueue(JMSServerInvoker.java:117)
                [java] at org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java:136)
                [java] at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:395)
                [java] at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:398)
                [java] at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
                [java] at java.lang.Thread.run(Thread.java:619)



                Jboss Startup Logs


                09:12:43,464 INFO [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
                09:12:44,043 INFO [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=juddiDB' to JNDI name 'java:juddiDB'
                09:12:44,058 INFO [JuddiRMIService] starting juddi RMI service
                09:12:44,436 INFO [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=JBossESBDS' to JNDI name 'java:JBossESBDS'
                09:12:44,449 INFO [ConfigurationControllerService] starting message configuration controller with config file jbossesb.xml
                09:12:44,485 INFO [ConfigurationController] loading configuration..
                09:12:44,662 INFO [ParamFileRepository] Setting parameter repository root dir to [/opt/jboss-4.0.5.GA/bin/.].
                09:12:46,647 INFO [Generator] Serializing ESB Aware Listener 'ConfigTree' configuration to [/opt/jboss-4.0.5.GA/server/default/conf/jbossesb-listener.xml].
                09:12:46,671 INFO [Generator] Serializing ESB Gateway 'ConfigTree' configuration to [/opt/jboss-4.0.5.GA/server/default/conf/jbossesb-gateway.xml].
                09:12:46,674 INFO [ConfigurationController] Parameter reload completed.
                09:12:46,734 INFO [ConfigurationController] Configuration Controller instance started.
                09:12:47,285 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
                09:12:48,202 INFO [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=MySqlDS' to JNDI name 'java:MySqlDS'
                09:12:49,311 INFO [A] Bound to JNDI name: queue/A
                09:12:49,329 INFO [B] Bound to JNDI name: queue/B
                09:12:49,348 INFO [C] Bound to JNDI name: queue/C
                09:12:49,365 INFO [D] Bound to JNDI name: queue/D
                09:12:49,389 INFO [ex] Bound to JNDI name: queue/ex
                09:12:49,442 INFO [testTopic] Bound to JNDI name: topic/testTopic
                09:12:49,458 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
                09:12:49,478 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
                09:12:49,500 INFO [testQueue] Bound to JNDI name: queue/testQueue
                09:12:49,625 INFO [UILServerILService] JBossMQ UIL service available at : /0.0.0.0:8093
                09:12:49,767 INFO [DLQ] Bound to JNDI name: queue/DLQ
                09:12:49,900 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
                09:12:51,680 INFO [Server] JBoss (MX MicroKernel) [4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)] Started in 56s:476ms

                • 5. Re: Installing JBossESB with MySQL
                  tfennelly

                  Hi.

                  Did you copy quickstarts/esb-quickstart-service.xml to your AS deploy dir? This service deployment file is required for deploying the JMS queues used by the quickstarts.

                  • 6. Re: Installing JBossESB with MySQL
                    ashish_rajhans

                    It all works now. Thanks guys