2 Replies Latest reply on May 10, 2002 7:40 AM by aarthin

    JBossMQ 3.0 question.

      Hi everybody,

      I'm trying to do an evaluation JBossMQ vs OpenJMS so I've
      downloaded the last jboss-all.zip from cvs and build
      both jboss and jms-examples.
      Everything goes find.

      I started JBossMQ and run one of the example: AsynchQueueReceiver and get following classical error:
      JNDI lookup failed: javax.naming.CommunicationException: Can't find SerialContextProvider
      Connection problem: javax.naming.CommunicationException: Can't find SerialContextProvider

      according to Sun, this error occur when: "The J2EE server is not running" but Agent view (http://localhost:8082/) reports under jboss.mq and service=Server:
      State = 3 and
      StateString= Started.

      What I'm doing wrong ?

      //Christine

        • 1. Re: JBossMQ 3.0 question.
          hchirino

          Make sure you initialize the InitialContext correctly. Either via a the jndi.properites file in the class path or an explicity Property object passed in the constructor.

          Here's the example of my jndi.properties

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

          • 2. Re: JBossMQ 3.0 question.
            aarthin

            Hi,
            I have used JBOSS to deploy my beans and a have written a client to lookup and access the bean. Initial context was set as follows

            System.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
            System.setProperty("java.naming.provider.url", "localhost:1099");

            Client was unable to lookup the hostServer until i set the context variable java.naming.factory.url.pkgs, in the initial context as below:

            System.setProperty("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");

            However later if i remove the java.naming.factory.url.pkgs,from the initial context,compile and run the client code, it runs without any hassles.

            Now why this strange behaviour?

            Please reply
            Regards
            Arathi