1 2 Previous Next 21 Replies Latest reply on Oct 22, 2008 8:37 AM by Davide ant

    Oracle AQ and JBoss ESB

    Tschungel Buch Newbie

      I need to send JMS messages from an Oracle database to the JBoss ESB.
      We are using JBoss ESB for a year with Oracle as the default datasource, which is working nicely.

      Now I extended the existing jboss-esb.xml with the definition for an additional jms provider and service according to the helloworld action quickstart.

      When the esb starts and the service is loaded I get the messages:
      2008-09-25 16:02:42,959 ERROR [org.jboss.soa.esb.oracle.aq.AQInitialContextFactory] JMSException exception
      oracle.jms.AQjmsException: Io exception: The Network Adapter could not establish the connection

      Now I am kind of lost and have 2 questions:
      1. Can I use the current default datasource for the oracle connection?
      2. Where or why do I get the error?

      Any help is very much appreciated.

      Kind regards
      Rene Heusser

      Content of jboss-esb.xml:

      <jms-provider name="JBossMQ"
      connection-factory="ConnectionFactory">

      <jms-bus busid="ToCustomerGateway">
      <jms-message-filter dest-type="QUEUE"
      dest-name="queue/axway_edi_ToCustomer" />
      </jms-bus>

      <jms-bus busid="FromCustomerGateway">
      <jms-message-filter dest-type="QUEUE"
      dest-name="queue/axway_edi_FromCustomer" />
      </jms-bus>

      and others ...

      </jms-provider>

      <jms-provider name="JBossOracleQ" connection-factory="QueueConnectionFactory">









      <jms-bus busid="quickstartGwChannel">
      <jms-message-filter dest-type="QUEUE"
      dest-name="queue/ACTION_REQUEST" />
      </jms-bus>

      <jms-bus busid="quickstartEsbChannel">
      <jms-message-filter dest-type="QUEUE"
      dest-name="queue/B" />
      </jms-bus>
      </jms-provider>
      <!-- ___________________________________________ -->

      <!-- S.C.H.E.D.U.L.E.D P.R.O.V.I.D.E.R.S -->
      <!-- ___________________________________________ -->




      <jms-listener name="JMS-Gateway"
      busidref="quickstartGwChannel"
      maxThreads="1"
      is-gateway="true"
      />
      <jms-listener name="JMS-ESBListener"
      busidref="quickstartEsbChannel"
      maxThreads="1"
      />














      The working datasource definition:

      <local-tx-datasource>
      <jndi-name>main-datasource</jndi-name>
      ......

        • 1. Re: Oracle AQ and JBoss ESB
          Tschungel Buch Newbie

          Somehow when posting the above the properties got lost so here they are:

          property name="java.naming.factory.initial" value="org.jboss.soa.esb.oracle.aq.AQInitialContextFactory"/>
          property name="java.naming.oracle.aq.user" value="myuser"/>
          property name="java.naming.oracle.aq.password" value="mypassword"/>
          property name="java.naming.oracle.aq.server" value="myserver.int.server.com"/>
          property name="java.naming.oracle.aq.instance" value="myinstance"/>
          property name="java.naming.oracle.aq.schema" value="myuser"/>
          property name="java.naming.oracle.aq.port" value="1521"/>
          property name="java.naming.oracle.aq.driver" value="thin"/>

          • 2. Re: Oracle AQ and JBoss ESB
            Mike Trzcianowski Newbie

            Hi Renee,

            Is that the only error you're getting?

            From the error it looks like a network problem. Can you ping the Oracle server from the ESB?

            Other things to check are:

            -Have these jars installed
            mockejb.jar
            org.jboss.soa.esb.oracle.aq-4.2.MR2.jar
            ojdbc14.jar
            aqapi13

            -Make sure the queue type is set to SYS.AQ$_JMS_MESSAGE

            - try using the dest-name without the "queue/" prefix.

            • 3. Re: Oracle AQ and JBoss ESB
              Tschungel Buch Newbie

              Dear Mike

              Thank you for your post. Please find my answers below:

              Is that the only error you're getting?
              --> No, you can find the rest, as of this morning at the end of this post.

              From the error it looks like a network problem. Can you ping the Oracle server from the ESB?
              --> Yes. All other services in the action list requiring database interaction, e.g. queries, call of packaged functions and the like work. Only the AQ connection fails.

              -Have these jars installed
              mockejb.jar
              org.jboss.soa.esb.oracle.aq-4.2.MR2.jar
              ojdbc14.jar
              aqapi13
              --> I have included them in the built of the *.esb app.

              -Make sure the queue type is set to SYS.AQ$_JMS_MESSAGE
              --> I created them using the following command:
              EXECUTE DBMS_AQADM.CREATE_QUEUE_TABLE (Queue_table => 'action_request', Queue_payload_type => 'SYS.AQ$_JMS_MESSAGE');
              EXECUTE DBMS_AQADM.CREATE_QUEUE (Queue_name => 'action_request',Queue_table => 'action_request');

              - try using the dest-name without the "queue/" prefix.
              --> Changed it with no effect so far.

              The error listing:
              2008-09-26 09:15:41,778 ERROR [org.jboss.soa.esb.oracle.aq.AQInitialContextFactory] JMSException exception
              oracle.jms.AQjmsException: Io exception: The Network Adapter could not establish the connection
              at oracle.jms.AQjmsDBConnMgr.checkForSecurityException(AQjmsDBConnMgr.java:926)
              at oracle.jms.AQjmsDBConnMgr.getConnection(AQjmsDBConnMgr.java:605)
              at oracle.jms.AQjmsDBConnMgr.(AQjmsDBConnMgr.java:387)
              at oracle.jms.AQjmsConnection.(AQjmsConnection.java:247)
              at oracle.jms.AQjmsQueueConnectionFactory.createQueueConnection(AQjmsQueueConnectionFactory.java:224)
              at org.jboss.soa.esb.oracle.aq.AQInitialContextFactory.addAQDestinationContext(AQInitialContextFactory.java:135)
              at org.jboss.soa.esb.oracle.aq.AQInitialContextFactory.getInitialContext(AQInitialContextFactory.java:224)
              at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
              at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
              at javax.naming.InitialContext.init(InitialContext.java:223)
              at javax.naming.InitialContext.(InitialContext.java:197)
              at org.jboss.soa.esb.helpers.NamingContext.getServerContext(NamingContext.java:65)
              at org.jboss.soa.esb.listeners.gateway.JmsGatewayListener.prepareMessageReceiver(JmsGatewayListener.java:335)
              at org.jboss.soa.esb.listeners.gateway.JmsGatewayListener.doInitialise(JmsGatewayListener.java:102)
              at org.jboss.soa.esb.listeners.lifecycle.AbstractManagedLifecycle.initialise(AbstractManagedLifecycle.java:133)
              at org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController.initialiseInstances(ManagedLifecycleController.java:160)
              at org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController.start(ManagedLifecycleController.java:79)
              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.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.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.GeneratedMethodAccessor10.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.GeneratedMethodAccessor24.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.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:610)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)

              [Linked-exception]
              java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
              at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
              at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
              at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
              at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
              at oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:414)
              at oracle.jdbc.driver.T4CConnection.(T4CConnection.java:165)
              at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
              at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
              at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:297)
              at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:221)
              at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:165)
              at oracle.jms.AQjmsDBConnMgr.getConnection(AQjmsDBConnMgr.java:554)
              at oracle.jms.AQjmsDBConnMgr.(AQjmsDBConnMgr.java:387)
              at oracle.jms.AQjmsConnection.(AQjmsConnection.java:247)
              at oracle.jms.AQjmsQueueConnectionFactory.createQueueConnection(AQjmsQueueConnectionFactory.java:224)
              at org.jboss.soa.esb.oracle.aq.AQInitialContextFactory.addAQDestinationContext(AQInitialContextFactory.java:135)
              at org.jboss.soa.esb.oracle.aq.AQInitialContextFactory.getInitialContext(AQInitialContextFactory.java:224)
              at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
              at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
              at javax.naming.InitialContext.init(InitialContext.java:223)
              at javax.naming.InitialContext.(InitialContext.java:197)
              at org.jboss.soa.esb.helpers.NamingContext.getServerContext(NamingContext.java:65)
              at org.jboss.soa.esb.listeners.gateway.JmsGatewayListener.prepareMessageReceiver(JmsGatewayListener.java:335)
              at org.jboss.soa.esb.listeners.gateway.JmsGatewayListener.doInitialise(JmsGatewayListener.java:102)
              at org.jboss.soa.esb.listeners.lifecycle.AbstractManagedLifecycle.initialise(AbstractManagedLifecycle.java:133)
              at org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController.initialiseInstances(ManagedLifecycleController.java:160)
              at org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController.start(ManagedLifecycleController.java:79)
              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.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.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.GeneratedMethodAccessor10.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.GeneratedMethodAccessor24.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.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:610)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)

              2008-09-26 09:15:41,780 WARN [org.jboss.soa.esb.listeners.lifecycle.AbstractManagedLifecycle] Unexpected exception caught while initialisation
              java.lang.RuntimeException: JMSException exception
              at org.jboss.soa.esb.oracle.aq.AQInitialContextFactory.addAQDestinationContext(AQInitialContextFactory.java:164)
              at org.jboss.soa.esb.oracle.aq.AQInitialContextFactory.getInitialContext(AQInitialContextFactory.java:224)
              at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
              at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
              at javax.naming.InitialContext.init(InitialContext.java:223)
              at javax.naming.InitialContext.(InitialContext.java:197)
              at org.jboss.soa.esb.helpers.NamingContext.getServerContext(NamingContext.java:65)
              at org.jboss.soa.esb.listeners.gateway.JmsGatewayListener.prepareMessageReceiver(JmsGatewayListener.java:335)
              at org.jboss.soa.esb.listeners.gateway.JmsGatewayListener.doInitialise(JmsGatewayListener.java:102)
              at org.jboss.soa.esb.listeners.lifecycle.AbstractManagedLifecycle.initialise(AbstractManagedLifecycle.java:133)
              at org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController.initialiseInstances(ManagedLifecycleController.java:160)
              at org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController.start(ManagedLifecycleController.java:79)
              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.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.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.GeneratedMethodAccessor10.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.GeneratedMethodAccessor24.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.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:610)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
              Caused by: oracle.jms.AQjmsException: Io exception: The Network Adapter could not establish the connection
              at oracle.jms.AQjmsDBConnMgr.checkForSecurityException(AQjmsDBConnMgr.java:926)
              at oracle.jms.AQjmsDBConnMgr.getConnection(AQjmsDBConnMgr.java:605)
              at oracle.jms.AQjmsDBConnMgr.(AQjmsDBConnMgr.java:387)
              at oracle.jms.AQjmsConnection.(AQjmsConnection.java:247)
              at oracle.jms.AQjmsQueueConnectionFactory.createQueueConnection(AQjmsQueueConnectionFactory.java:224)
              at org.jboss.soa.esb.oracle.aq.AQInitialContextFactory.addAQDestinationContext(AQInitialContextFactory.java:135)
              ... 60 more
              2008-09-26 09:15:41,781 WARN [org.jboss.soa.esb.couriers.CourierFactory] Calling cleanup on existing couriers for identity LifecycleIdentity:4
              2008-09-26 09:15:41,829 WARN [org.jboss.system.ServiceController] Problem starting service jboss.esb:deployment=GSCF-XMT1-EDIGW-STX-0.17.0-SNAPSHOT.esb
              org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException: java.lang.RuntimeException: JMSException exception
              at org.jboss.soa.esb.listeners.lifecycle.AbstractManagedLifecycle.initialise(AbstractManagedLifecycle.java:145)
              at org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController.initialiseInstances(ManagedLifecycleController.java:160)
              at org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController.start(ManagedLifecycleController.java:79)
              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.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.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.GeneratedMethodAccessor10.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.GeneratedMethodAccessor24.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.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:610)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
              Caused by: java.lang.RuntimeException: JMSException exception
              at org.jboss.soa.esb.oracle.aq.AQInitialContextFactory.addAQDestinationContext(AQInitialContextFactory.java:164)
              at org.jboss.soa.esb.oracle.aq.AQInitialContextFactory.getInitialContext(AQInitialContextFactory.java:224)
              at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
              at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
              at javax.naming.InitialContext.init(InitialContext.java:223)
              at javax.naming.InitialContext.(InitialContext.java:197)
              at org.jboss.soa.esb.helpers.NamingContext.getServerContext(NamingContext.java:65)
              at org.jboss.soa.esb.listeners.gateway.JmsGatewayListener.prepareMessageReceiver(JmsGatewayListener.java:335)
              at org.jboss.soa.esb.listeners.gateway.JmsGatewayListener.doInitialise(JmsGatewayListener.java:102)
              at org.jboss.soa.esb.listeners.lifecycle.AbstractManagedLifecycle.initialise(AbstractManagedLifecycle.java:133)
              ... 51 more
              Caused by: oracle.jms.AQjmsException: Io exception: The Network Adapter could not establish the connection
              at oracle.jms.AQjmsDBConnMgr.checkForSecurityException(AQjmsDBConnMgr.java:926)
              at oracle.jms.AQjmsDBConnMgr.getConnection(AQjmsDBConnMgr.java:605)
              at oracle.jms.AQjmsDBConnMgr.(AQjmsDBConnMgr.java:387)
              at oracle.jms.AQjmsConnection.(AQjmsConnection.java:247)
              at oracle.jms.AQjmsQueueConnectionFactory.createQueueConnection(AQjmsQueueConnectionFactory.java:224)
              at org.jboss.soa.esb.oracle.aq.AQInitialContextFactory.addAQDestinationContext(AQInitialContextFactory.java:135)
              ... 60 more
              2008-09-26 09:15:41,870 ERROR [org.jboss.deployment.scanner.URLDeploymentScanner] Incomplete Deployment listing:


              • 4. Re: Oracle AQ and JBoss ESB
                Tschungel Buch Newbie

                Dear Mike

                I found the cause of the error. It was in the property:
                property name="java.naming.oracle.aq.server" value="myserver.int.server.com"/>

                I used the TNS name of the database server rather than the host name, after changing the name the connection to the queue was possible.

                But now I have another problem:
                As soon as the bus is started I get the message "The connection pool was exhausted." although that I have increased the minimum and maximum pool size.

                Instead of providing all the connection properties is it possible to reference the main data source?

                • 5. Re: Oracle AQ and JBoss ESB
                  Mike Trzcianowski Newbie

                  Hi Rene,

                  As far as I know, there is no way to specify the main data source. Or I just don't know how to go about it.

                  When do you get the "The connection pool was exhausted" error? Do you have any additional errors/messages?

                  I know that Oracle server has a configuration for limiting the number of connections. So you could verify that on the server as well.
                  What version of Oracle are you using?

                  You can also try updating the following value in the jbossesb-properties.xml file. The default is 20:

                  <property name="org.jboss.soa.esb.jms.connectionPool" value="20" />
                  


                  • 6. Re: Oracle AQ and JBoss ESB
                    Tschungel Buch Newbie

                    Dear Mike

                    Thank you for your assistance.

                    I received the connection pool exhausted message because the oracle user was not granted execution rights to DBMS_AQIN.

                    Now everything from the ESB side is fine.

                    Currently I am only fighting with getting AQ jms byte and long varchar messages to the bus, but I have reserved this for my "Monday adventure".

                    I will also dig into the main data source issue and will let you know, if I find something.

                    Thanks again and a nice weekend.

                    Rene

                    • 7. Re: Oracle AQ and JBoss ESB
                      Tschungel Buch Newbie

                      Dear Mike

                      I kind of struggle here with the oracle side...

                      I created the queue table and queue of type sys.aq$_jms_message, but I do not find any information on how then to create/construct a jms_message.
                      I read
                      Oracle® Streams
                      Advanced Queuing User's Guide and Reference
                      10g Release 2 (10.2)
                      B14257-01
                      back and forward but must have missed something.

                      Would you be able to provide me with a sample of how to create and send an oracle jms message to the ESB?

                      Thank you very much for your support.

                      Kind regards
                      Rene

                      • 8. Re: Oracle AQ and JBoss ESB
                        Ilya Newbie

                        You can post a message to a queue using pl/sql like that:

                        DECLARE
                        enqueue_options DBMS_AQ.enqueue_options_t;
                        message_properties DBMS_AQ.message_properties_t;
                        message_handle RAW(16);
                        MESSAGE SYS.aq$_jms_message;
                        BEGIN
                        MESSAGE := SYS.aq$_jms_message.construct(0);
                        MESSAGE.set_text('Hello :)');
                        MESSAGE.set_userid('Userid_if_reqd');
                        MESSAGE.set_string_property('JMS_OracleDeliveryMode', 2);
                        DBMS_AQ.enqueue(queue_name => 'YOUR_QUEUE_NAME', enqueue_options => enqueue_options, message_properties => message_properties, payload => MESSAGE, msgid => message_handle);
                        COMMIT;
                        END;

                        • 9. Re: Oracle AQ and JBoss ESB
                          Tschungel Buch Newbie

                          Thank you very much.

                          It worked this way!

                          Thanks and kind regards
                          Rene

                          • 10. Re: Oracle AQ and JBoss ESB
                            Ilya Newbie

                            tschungelbuch,
                            may be you can help us to solve similar problem.

                            we discuss it in http://www.jboss.com/index.html?module=bb&op=viewtopic&t=143504.

                            What version of Oracle DB, Oracle Client, and aqapi.jar you are using ?
                            Can you run the program from mentioned topic ?

                            • 11. Re: Oracle AQ and JBoss ESB
                              Davide ant Newbie

                              Hi, i have a problem when deploy, it seams class not found problema but i have put in the .esb all the jar..
                              this my error:

                              --- MBeans waiting for other MBeans ---
                              ObjectName: jboss.esb:deployment=Test-Esb-OracleAQ.esb
                               State: FAILED
                               Reason: java.lang.NoSuchMethodError: oracle.jms.AQjmsFactory.getXAConnectionFa
                              ctory(Ljavax/sql/XADataSource;)Ljavax/jms/XAConnectionFactory;
                               I Depend On:
                               jboss.esb.quickstart.destination:service=Queue,name=quickstart_helloworld_ac
                              tion_Request
                               jboss.esb.quickstart.destination:service=Queue,name=quickstart_helloworld_ac
                              tion_Response
                               jboss.esb:deployment=jbossesb.esb
                              
                              --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
                              ObjectName: jboss.esb:deployment=Test-Esb-OracleAQ.esb
                               State: FAILED
                               Reason: java.lang.NoSuchMethodError: oracle.jms.AQjmsFactory.getXAConnectionFa
                              ctory(Ljavax/sql/XADataSource;)Ljavax/jms/XAConnectionFactory;
                               I Depend On:
                               jboss.esb.quickstart.destination:service=Queue,name=quickstart_helloworld_ac
                              tion_Request
                               jboss.esb.quickstart.destination:service=Queue,name=quickstart_helloworld_ac
                              tion_Response
                               jboss.esb:deployment=jbossesb.esb


                              any idea

                              • 12. Re: Oracle AQ and JBoss ESB
                                Mark Little Master

                                Which version of JBossESB?

                                • 13. Re: Oracle AQ and JBoss ESB
                                  Davide ant Newbie

                                  The version is:
                                  jbossesb-server-4.4.GA

                                  end this is: jboss-esb.xml:

                                  <?xml version = "1.0" encoding = "UTF-8"?>
                                  <jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">
                                  
                                   <providers>
                                   <jms-provider name="JBossMQ" connection-factory="QueueConnectionFactory">
                                   <property name="java.naming.factory.initial" value="org.jboss.soa.esb.oracle.aq.AQInitialContextFactory"/>
                                   <property name="java.naming.oracle.aq.user" value="cis"/>
                                   <property name="java.naming.oracle.aq.password" value="cispsw"/>
                                   <property name="java.naming.oracle.aq.server" value="localhost"/>
                                   <property name="java.naming.oracle.aq.instance" value="ORCL3"/>
                                   <property name="java.naming.oracle.aq.schema" value="cis"/>
                                   <property name="java.naming.oracle.aq.port" value="1521"/>
                                   <jms-bus busid="quickstartGwChannel">
                                   <jms-message-filter
                                   dest-type="QUEUE"
                                   dest-name="ACTION_REQUEST"
                                   />
                                   </jms-bus>
                                   <jms-bus busid="quickstartEsbChannel">
                                   <jms-message-filter
                                   dest-type="QUEUE"
                                   dest-name="B"
                                   />
                                   </jms-bus>
                                  
                                   </jms-provider>
                                   </providers>
                                  
                                   <services>
                                  
                                   <service category="HelloWorld_ActionESB"
                                   name="SimpleListener"
                                   description="Hello World" >
                                   <listeners>
                                   <jms-listener name="JMS-Gateway"
                                   busidref="quickstartGwChannel"
                                   is-gateway="true"
                                   />
                                   <jms-listener name="JMS-ESBListener"
                                   busidref="quickstartEsbChannel"
                                   />
                                   </listeners>
                                   <actions>
                                   <action name="displayAction"
                                   class="org.jboss.soa.esb.samples.quickstart.helloworldaction.MyJMSListenerAction"
                                   process="displayMessage">
                                   <property name="exceptionMethod" value="exceptionHandler"/>
                                   </action>
                                   <action name="playAction"
                                   class="org.jboss.soa.esb.samples.quickstart.helloworldaction.MyJMSListenerAction"
                                   process="playWithMessage">
                                  
                                   <property name="exceptionMethod" value="exceptionHandler"/>
                                   </action>
                                   <action name="notificationAction"
                                   class="org.jboss.soa.esb.actions.Notifier">
                                   <property name="okMethod" value="notifyOK" />
                                   <property name="notification-details">
                                   <NotificationList type="OK">
                                   <target class="NotifyConsole" />
                                   <target class="NotifyQueues">
                                   <messageProp name="quickstart" value="hello_world_action" />
                                   <queue jndiName="HELLO_WORLD_ACTION" connection-factory="QueueConnectionFactory">
                                   <property name="java.naming.factory.initial" value="org.jboss.soa.esb.oracle.aq.AQInitialContextFactory"/>
                                   <property name="java.naming.oracle.aq.user" value="cis"/>
                                   <property name="java.naming.oracle.aq.password" value="cis"/>
                                   <property name="java.naming.oracle.aq.server" value="localhost"/>
                                   <property name="java.naming.oracle.aq.instance" value="ORCL3"/>
                                   <property name="java.naming.oracle.aq.schema" value="cis"/>
                                   <property name="java.naming.oracle.aq.port" value="1521"/>
                                   <property name="java.naming.oracle.aq.driver" value="thin"/>
                                   </queue>
                                   </target>
                                   </NotificationList>
                                   </property>
                                   </action>
                                   </actions>
                                   </service>
                                   </services>
                                  
                                  </jbossesb>



                                  • 14. Re: Oracle AQ and JBoss ESB
                                    Davide ant Newbie

                                    The problem is that aqapi13.jar doesn't have the method : oracle.jms.AQjmsFactory.getXAConnectionFactory.
                                    Any Idea about this?

                                    Many Thanks.

                                    1 2 Previous Next