8 Replies Latest reply on Dec 1, 2009 2:02 PM by davidchen1124

    can not get helloworld_action oracle-aq work

    davidchen1124

      Hi, there:

      I'm using "jboss-soa-p-standalone.4.3.0", oracle 10g to run helloworld_action sample code. Everything works fine by using jbossmq. However, I can not get it work with oracle aq.

      Following the readme.txt in oracle-aq directory:
      1. I modified jboss-esb.xml;
      2. Created oracle aq by using 'SYS.AQ$_JMS_MESSAGE' as payload type;
      3. Tried both plugins org.jboss.soa.esb.oracle.aq-4.3.jar and 4.2.jar;
      However, it gives me those error processing courier messages.
      So, highly appreciated if anyone can share his experience or any suggestions to get oracle aq works with jboss esb. Thanks a lot in advance.

      David


      11:36:02,715 WARN [MessageAwareListener] Error processing courier, backing off
      for 32000 milliseconds
      11:36:34,730 INFO [JmsConnectionPool] Received NamingException, refreshing cont
      ext.
      11:36:35,730 WARN [MessageAwareListener] Error processing courier, backing off
      for 32000 milliseconds


        • 1. Re: can not get helloworld_action oracle-aq work
          beve

          Hi,

          can you check the server.log and see if there is more information in it?

          Thanks,

          /Daniel

          • 2. Re: can not get helloworld_action oracle-aq work
            davidchen1124

            Hi, there:

            Thank you very much for reply. I double checked server.log, no more information I can find.
            After call "ant deploy", all information in server.log is listed below.

            Please let me know if any suggestion or comments. Thanks a lot
            David


            2009-11-26 10:32:17,778 INFO [org.jboss.soa.esb.listeners.config.JBoss4ESBDeployer] create esb service, Quickstart_helloworld_action.esb
            2009-11-26 10:32:17,794 INFO [org.jboss.jms.server.destination.QueueService] Queue[/queue/quickstart_helloworld_action_Request] started, fullSize=200000, pageSize=2000, downCacheSize=2000
            2009-11-26 10:32:17,809 INFO [org.jboss.jms.server.destination.QueueService] Queue[/queue/quickstart_helloworld_action_Response] started, fullSize=200000, pageSize=2000, downCacheSize=2000
            2009-11-26 10:32:17,950 INFO [org.apache.juddi.datastore.jdbc.JDBCDataStore] Generated token 'authToken:06BCC3E0-DABA-11DE-A37B-E67A177F4BE3' for user: 'jbossesb/JBoss ESB User'
            2009-11-26 10:32:22,090 INFO [org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool] Received NamingException, refreshing context.
            2009-11-26 10:32:23,106 WARN [org.jboss.soa.esb.listeners.message.MessageAwareListener] Error processing courier, backing off for 1000 milliseconds
            2009-11-26 10:32:24,121 INFO [org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool] Received NamingException, refreshing context.
            2009-11-26 10:32:25,121 WARN [org.jboss.soa.esb.listeners.message.MessageAwareListener] Error processing courier, backing off for 2000 milliseconds
            2009-11-26 10:32:27,137 INFO [org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool] Received NamingException, refreshing context.
            2009-11-26 10:32:28,153 WARN [org.jboss.soa.esb.listeners.message.MessageAwareListener] Error processing courier, backing off for 4000 milliseconds
            2009-11-26 10:32:32,168 INFO [org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool] Received NamingException, refreshing context.
            2009-11-26 10:32:33,184 WARN [org.jboss.soa.esb.listeners.message.MessageAwareListener] Error processing courier, backing off for 8000 milliseconds
            2009-11-26 10:32:41,199 INFO [org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool] Received NamingException, refreshing context.
            2009-11-26 10:32:42,214 WARN [org.jboss.soa.esb.listeners.message.MessageAwareListener] Error processing courier, backing off for 16000 milliseconds
            2009-11-26 10:32:58,214 INFO [org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool] Received NamingException, refreshing context.
            2009-11-26 10:32:59,229 WARN [org.jboss.soa.esb.listeners.message.MessageAwareListener] Error processing courier, backing off for 32000 milliseconds


            • 3. Re: can not get helloworld_action oracle-aq work
              davidchen1124

              It seems some NamingException, should I modify jndi.properties, or juddi.properties? Although it said in readme.xml to copy jndi.properties to hellowworld_action directory, however, I did not find any jndi.properties file in oracle-aq directory. So, I did not change anything in jndi.properties, will it be the problem?

              Thanks a lot
              David

              The original jndi.properties is:


              java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
              java.naming.provider.url=jnp://localhost:1099
              java.naming.factory.url.pkgs=org.jboss.naming
              java.naming.factory.url.pkgs=org.jnp.interfaces


              • 4. Re: can not get helloworld_action oracle-aq work
                davidchen1124

                include more debug information in server.log file I got that NamingException below.

                It seems some "QueueConnectionFactory not bound" to jndi. However, don't know how to solve that naming problem. Any help on this issue will be highly appreciated.

                Thanks a lot in advance.
                David


                2009-11-26 11:19:59,384 DEBUG [org.jboss.soa.esb.listeners.message.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:496)
                at org.jboss.internal.soa.esb.couriers.JmsCourier.pickupPayload(JmsCourier.java:463)
                at org.jboss.internal.soa.esb.couriers.JmsCourier.pickup(JmsCourier.java:456)
                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:294)
                at org.jboss.soa.esb.listeners.message.MessageAwareListener.doRun(MessageAwareListener.java:250)
                at org.jboss.soa.esb.listeners.lifecycle.AbstractThreadedManagedLifecycle.run(AbstractThreadedManagedLifecycle.java:115)
                at java.lang.Thread.run(Thread.java:595)
                Caused by: org.jboss.soa.esb.couriers.CourierServiceBindException: Failed to get JMS Session from pool.
                at org.jboss.internal.soa.esb.couriers.JmsCourier.getJmsSession(JmsCourier.java:161)
                at org.jboss.internal.soa.esb.couriers.JmsCourier.createMessageConsumer(JmsCourier.java:580)
                at org.jboss.internal.soa.esb.couriers.JmsCourier.internalPickupPayload(JmsCourier.java:488)
                ... 8 more
                Caused by: javax.naming.NameNotFoundException: QueueConnectionFactory not bound
                at org.jnp.server.NamingServer.getBinding(NamingServer.java:581)
                at org.jnp.server.NamingServer.getBinding(NamingServer.java:589)
                at org.jnp.server.NamingServer.getObject(NamingServer.java:595)
                at org.jnp.server.NamingServer.lookup(NamingServer.java:342)
                at sun.reflect.GeneratedMethodAccessor91.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:585)
                at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
                at sun.rmi.transport.Transport$1.run(Transport.java:153)
                at java.security.AccessController.doPrivileged(Native Method)
                at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
                at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
                at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
                at java.lang.Thread.run(Thread.java:595)
                at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
                at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
                at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
                at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
                at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:667)
                at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
                at javax.naming.InitialContext.lookup(InitialContext.java:351)
                at org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool.getFactoryConnection(JmsConnectionPool.java:315)
                at org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool.internalGetSession(JmsConnectionPool.java:218)
                at org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool.getSession(JmsConnectionPool.java:190)
                at org.jboss.internal.soa.esb.couriers.JmsCourier.getJmsSession(JmsCourier.java:159)
                ... 10 more


                • 5. Re: can not get helloworld_action oracle-aq work
                  beve

                  Hi,

                  can you post the jms-provider section from jboss-esb.xml for your configuration. I'd like to check the name of the connection-factory attribute. Is it set to 'QueueConnectionFactory'?

                  Regards,

                  /Daniel

                  • 6. Re: can not get helloworld_action oracle-aq work
                    davidchen1124

                    Thank you very much for your reply.

                    The jboss-esb.xml is listed below. Please let me know if found anything, or any hint are highly appreciated.

                    Thanks a lot
                    David

                    <?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="david"/>
                     <property name="java.naming.oracle.aq.password" value="david"/>
                     <property name="java.naming.oracle.aq.server" value="192.168.100.100"/>
                     <property name="java.naming.oracle.aq.instance" value="testdv2"/>
                     <property name="java.naming.oracle.aq.schema" value="david"/>
                     <property name="java.naming.oracle.aq.port" value="1521"/>
                     <property name="java.naming.oracle.aq.driver" value="thin"/>
                     <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="david"/>
                     <property name="java.naming.oracle.aq.password" value="david"/>
                     <property name="java.naming.oracle.aq.server" value="192.168.100.100"/>
                     <property name="java.naming.oracle.aq.instance" value="testdv2"/>
                     <property name="java.naming.oracle.aq.schema" value="david"/>
                     <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>
                    
                    


                    • 7. Re: can not get helloworld_action oracle-aq work
                      beve

                      Hi David,

                      Can you check /server/default/deploy/jboss-messaging.sar/connection-factories-service.xml and see if there is a jndi binding for 'QueueConnectionFactory' in it.
                      If there is not please use one that is configured there, for example 'ConnectionFactory'

                      Regards,

                      /Daniel

                      • 8. Re: can not get helloworld_action oracle-aq work
                        davidchen1124

                        Thank you very much Daniel. You are right. After using "ConnectionFactory", at least it solves that naming exception (seems my oracle AQ still have some problems to receive message).

                        Thanks a lot again for your help.

                        David