4 Replies Latest reply on Oct 7, 2010 6:40 PM by tcunning

    How to get helloworld_action with OracleAQ running?

    mnjboss

      Dear Community,

       

      i would like to get the samples/quickstarts/helloworld_action running with Oracle Advanced Queuing.

       

      I'm using JBossESB 4.9 deployed on JBossAS 4.2.3 GA.

      Java Version: JDK 1.6.0_20.

      Oracle Version: Oracle Enterprise 11.1.0.6.0

       

      I tried to follow the readme.txt in samples/quickstarts/helloworld_action/oracle-aq but i can't find the lib/ext/jms/oracleaq folder.

      So I have tried to get the required libs from the internet except the asm.jar which I found in deploy/jbpm.esb.

       

      The Oracle-libs are also confusing me.

      ojdbc14.jar is build for JDK1.4 an should be incompatible with JDK1.6 - so I replaced it with ojdbc6.jar from my Oracle installation.

      aqapi13.jar, should be the same with this lib, so I also replaced it with the one from my Oracle installation.

       

      I have created a Queue in Oracle with the proposed commands in readme.txt.

       

      I slimed down the jboss-esb.xml a little so that it looks like this now:

       

      <?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="ConnectionFactory">
                      <property name="java.naming.factory.initial"    value="org.jboss.soa.esb.oracle.aq.AQInitialContextFactory"/>
          <property name="java.naming.oracle.aq.user"     value="my_user"/>
          <property name="java.naming.oracle.aq.password" value="my_passwd"/>
          <property name="java.naming.oracle.aq.server"   value="localhost"/>
          <property name="java.naming.oracle.aq.instance" value="ORCL"/>
          <property name="java.naming.oracle.aq.schema"   value="my_user"/>
          <property name="java.naming.oracle.aq.port"     value="1521"/>
          <property name="java.naming.oracle.aq.driver"   value="thin"/>   
                    <jms-bus busid="quickstartEsbChannel">
                        <jms-message-filter
              dest-type="QUEUE"
                            dest-name="Q_TEST"
                        />
                    </jms-bus>

                </jms-provider>
            </providers>
           
            <services>
               
              <service category="HelloWorld_ActionESB"
                       name="SimpleListener"
                       description="Hello World" >
                  <listeners>
                      <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>
                  
                  </actions>
              </service>
            </services>
          
      </jbossesb>

       

      In fact I have just removed the second channel/queue, the listener for the second channel/queue and some actions.

       

      I copied all libs in the samples/quickstarts/helloworld_action/lib directory and ran "ant deploy" which succeeded.

      Now starting my JBoss shows the following errors in the Console (running in DEBUG mode):

       

      14:00:28,417 DEBUG [MessageAwareListener] Courier Exception
      org.jboss.soa.esb.couriers.CourierException: Unable to create Message Consumer
      at org.jboss.internal.soa.esb.couriers.JmsCourier.internalPickupPayload(JmsCourier.java:498)
      at org.jboss.internal.soa.esb.couriers.JmsCourier.pickupPayload(JmsCourier.java:466)
      at org.jboss.internal.soa.esb.couriers.JmsCourier.pickup(JmsCourier.java:459)
      at org.jboss.internal.soa.esb.couriers.TwoWayCourierImpl.pickup(TwoWayCourierImpl.java:228)
      at org.jboss.internal.soa.esb.couriers.TwoWayCourierImpl.pickup(TwoWayCourierImpl.java:204)
      at org.jboss.soa.esb.listeners.message.MessageAwareListener.waitForEventAndProcess(MessageAwareListener.java:297)
      at org.jboss.soa.esb.listeners.message.MessageAwareListener.doRun(MessageAwareListener.java:253)
      at org.jboss.soa.esb.listeners.lifecycle.AbstractThreadedManagedLifecycle.run(AbstractThreadedManagedLifecycle.java:115)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: org.jboss.soa.esb.couriers.CourierException: javax.jms.JMSException: This destination does not exist !QUEUE.Q_TEST
      at org.jboss.internal.soa.esb.couriers.JmsCourier.createMessageConsumer(JmsCourier.java:635)
      at org.jboss.internal.soa.esb.couriers.JmsCourier.internalPickupPayload(JmsCourier.java:490)
      ... 8 more
      Caused by: javax.jms.JMSException: This destination does not exist !QUEUE.Q_TEST
      at org.jboss.mq.server.JMSDestinationManager.createQueue(JMSDestinationManager.java:637)
      at org.jboss.mq.server.JMSServerInterceptorSupport.createQueue(JMSServerInterceptorSupport.java:111)
      at org.jboss.mq.server.TracingInterceptor.createQueue(TracingInterceptor.java:259)
      at org.jboss.mq.server.JMSServerInvoker.createQueue(JMSServerInvoker.java:117)
      at org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java:139)
      at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:419)
      at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:398)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:761)
      ... 1 more
      14:00:28,417 WARN  [MessageAwareListener] Error processing courier, backing off for 1000 milliseconds

       

       

      I have no idea what causes the "javax.jms.JMSException: This destination does not exist !QUEUE.Q_TEST" error.

      I could not get it to work.

       

      Thanks in advance for your help.

       

      DE