3 Replies Latest reply on Nov 24, 2011 10:22 AM by mani v

    jms-jca-provider with remote environment queue

    mani v Newbie

      Hi,

       

      when we try to use jms-jca-provider with remote environment queue as depict below..

       

      jboss-esb.xml file

      ------------------------

      <jms-jca-provider

         providerAdapterJNDI="java:/RemoteJMSProvider"

         name="dbsync.application.provider.${ INTERFACE_NAME}">

         <jms-bus busid="jms.channel.gateway.${ INTERFACE_NAME}">

          <jms-message-filter dest-name="queue/${ INTERFACE_MSG_QUEUE}"

           dest-type="QUEUE" jms-security-credential="${ INTERFACE_MSG_QUEUE_CREDENTIAL}"

           jms-security-principal="${ INTERFACE_MSG_QUEUE_PRINCIPAL}"

           transacted="true" />

         </jms-bus>

         <jms-bus busid="jms.channel.secured.${ INTERFACE_NAME}">

          <jms-message-filter dest-name="queue/${ INTERFACE_TXN_QUEUE}"

           dest-type="QUEUE" jms-security-credential="${ INTERFACE_TXN_QUEUE_CREDENTIAL}"

           jms-security-principal="${ INTERFACE_TXN_QUEUE_PRINCIPAL}"

           transacted="true" />

         </jms-bus>

         <activation-config>

          <property name="dLQMaxResent" value="${ DLQMAX_RESENT}" />

         </activation-config>

        </jms-jca-provider>

      ------------------------

       

      jms-ds.xml file for

      ------------------------------

      <mbean code="org.jboss.jms.jndi.JMSProviderLoader"

      name="jboss.esb:service=JMSProviderLoader,name=RemoteJMSProvider,server=remote">  

             <attribute name="ProviderName">RemoteJMSProvider</attribute>      

             <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter  

             </attribute>  

             <attribute name="QueueFactoryRef">XAConnectionFactory</attribute>  

             <attribute name="TopicFactoryRef">XAConnectionFactory</attribute>  

          <attribute name="Properties">  

                java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory  

                java.naming.factory.url.pkgs=org.jnp.interfaces  

                java.naming.provider.url=jnp://<remote_server_ip>:1299  

             </attribute>  

         </mbean>

      -------------------------------

      even though we are setting classpath to jnpserver.jar file. we are getting below exception...

       

      Exception we are getting

      ----------------------

      2011-11-21 11:55:14,609 INFO  [org.jboss.resource.adapter.jms.inflow.JmsActivation] (WorkManager(2)-9) Attempting to reconnect org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@fbc1cd(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@1e522a6 destination=queue/aacs_base_Q destinationType=javax.jms.Queue tx=true durable=false reconnect=10 provider=java:/RemoteJMSProvider user=null maxMessages=1 minSession=1 maxSession=10 keepAlive=60000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=5)

      2011-11-21 11:55:14,610 ERROR [org.jboss.resource.adapter.jms.inflow.JmsActivation] (WorkManager(2)-9) Unable to reconnect org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@fbc1cd(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@1e522a6 destination=queue/aacs_base_Q destinationType=javax.jms.Queue tx=true durable=false reconnect=10 provider=java:/RemoteJMSProvider user=null maxMessages=1 minSession=1 maxSession=10 keepAlive=60000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=5)

      javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory    [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory   ]

      at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)

      at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)

      at javax.naming.InitialContext.init(InitialContext.java:223)

      at javax.naming.InitialContext.<init>(InitialContext.java:197)

      at org.jboss.jms.jndi.JNDIProviderAdapter.getInitialContext(JNDIProviderAdapter.java:44)

      at org.jboss.resource.adapter.jms.inflow.JmsActivation.setup(JmsActivation.java:347)

      at org.jboss.resource.adapter.jms.inflow.JmsActivation.handleFailure(JmsActivation.java:292)

      at org.jboss.resource.adapter.jms.inflow.JmsActivation$SetupActivation.run(JmsActivation.java:733)

      at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:205)

      at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:260)

      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

      at java.lang.Thread.run(Thread.java:619)

      Caused by: java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory  

      at java.net.URLClassLoader$1.run(URLClassLoader.java:200)

      at java.security.AccessController.doPrivileged(Native Method)

      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)

      at java.lang.ClassLoader.loadClass(ClassLoader.java:307)

      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

      at java.lang.ClassLoader.loadClass(ClassLoader.java:252)

      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)

      at java.lang.Class.forName0(Native Method)

      at java.lang.Class.forName(Class.java:247)

      at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:292)

      at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1119)

      at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:798)

      at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:441)

      at java.lang.ClassLoader.loadClass(ClassLoader.java:252)

      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)

      at java.lang.Class.forName0(Native Method)

      at java.lang.Class.forName(Class.java:247)

      at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:46)

      at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654)

      ... 12 more

      --------------------------

       

      please advice asap

        • 1. Re: jms-jca-provider with remote environment queue
          Tom Cunningham Master

          Where is your jms-ds.xml file?      Is it inside your .esb?    Is it in the deploy directory?

           

          Which app server version are you using?

          • 2. Re: jms-jca-provider with remote environment queue
            mani v Newbie

            Where is your jms-ds.xml file?

                 >> inside below folder

                 >> \jboss-soa-p-standalone.5.0.0\jboss-esb\server\default\deploy\messaging

            Which app server version are you using?

                 >> both standalone and soa platform tried.

                 >>JBoss [SOA] 5.0.2.GA_SOA (build: SVNTag=5.0.2.GA_SOA date=201006221603)

                 >>JBoss [SOA_STANDALONE] 5.0.2.GA_SOA_STANDALONE (build: SVNTag=5.0.2.GA_SOA_STANDALONE date=201006221603)

             

            and i am putting jnpserver.jar inside \jboss-soa-p-standalone.5.0.0\jboss-esb\server\default\lib  folder as well.

            But it is not working..

             

            my jndi.properties as below in \jboss-soa-p-standalone.5.0.0\jboss-esb\server\default\conf  folder

            pls ignore "com.tibco.tibjms.naming" coz i have queue connectionwith tibco as well in environment.

            -----------

            # DO NOT EDIT THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING
            #
            java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
            java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces:com.tibco.tibjms.naming
            ------------------------

            • 3. Re: jms-jca-provider with remote environment queue
              mani v Newbie

              java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory  issue is being resolved after changing the value in jms-ds.xml file.

              from

                   org.jnp.interfaces

              to

                   java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces