2 Replies Latest reply on Aug 16, 2010 8:31 AM by divakar

    How to use external or third party jar in the classpath of a bundle.

    divakar

      Hi,

       

      I am try to create a JMS consumer for a Weblogic topic destination,

       

      I am using jndiTemplate for the connection factory,

       

      For the "java.naming.factory.initial" property value I have to provide "weblogic.jndi.WLInitialContextFactory" as the value and this class is present the wlclient.jar.

       

      While startign the JMS consumer bundle I am getting a "weblogic.jndi.WLInitialContextFactory" classnot found exception,

       

      My question is how can I have this third party jar in the classpath of the Fuse 4.2 or in the bundle.

       

      Thanks,

      Divakar B

        • 1. Re: How to use external or third party jar in the classpath of a bundle.
          ffang

          Hi,

           

          You need install third party jar containing weblogic.jndi.WLInitialContextFactory as a bundle, and then in your JMS consumer bundle you should import weblogic.jndi package.

           

           

          Btw, you should put this question on FUSE ESB forum.

          Freeman

          • 2. Re: How to use external or third party jar in the classpath of a bundle.
            divakar

            Thanks, Yes I should have dropped this in the ESB forum, I did it accidentally,

             

            You answer helped me,

             

            I installed the jar file as bundle using the following command,

             

            osgi:install -s wrap:file:///C:/xxx/xxx.jar

             

            -


            I am facing another issue now weblogic jms consumer,

             

            karaf@root> Exception in thread "SpringOsgiExtenderThread-66" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.servicemix.jms.endpoints.JmsConsumerEnd

            point#0' defined in URL bundleentry://212.fwk27263487/META-INF/spring/xbean.xml: Cannot resolve reference to bean 'connectionFactory' while setting bean property 'connectionFactory'; nested exceptio

            n is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'connectionFactory' defined in URL bundleentry://212.fwk27263487/META-INF/spring/xbean.xml: Invocation of

            init method failed; nested exception is javax.naming.CommunicationException [Root exception is java.net.ConnectException: xxx.xxx.com/xx.xx.xx

            xx:xxxx  Bootstrap to xxx.xxx.com/xx.xx.xx

            xx:xxxx failed. It is likely that the remote side declared peer gone on this JVM