1 Reply Latest reply on Jul 5, 2002 8:32 AM by Levin

    javax.naming.NamingException

    Levin Newbie

      Hi all

      I use the messaging samples from jboss-mq
      (QueueBrowserExample and SampleUtillities

      What in hell i've do wrong ?

      Please give me some hints! Thanx

      Here are some sniplets and the errormessage:



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

      queueName = new String(args[0]);

      try {
      queueConnectionFactory =SampleUtilities.getQueueConnectionFactory();
      ....

      Class SampleUtilities
      ...
      public static final boolean USE_JNDI = true;
      public static final String QUEUECONFAC = "ConnectionFactory";
      public static final String TOPICCONFAC = "ConnectionFactory";
      private static Context jndiContext = null;
      ...
      return (javax.jms.QueueConnectionFactory) jndiLookup(QUEUECONFAC);

      ...

      Error is:

      javax.naming.NamingException: Invalid reference. Error: org.jboss.mq.GenericConnectionFactory; Local class not compatible: stream classdesc serialVersionUID=2288420610006129296 local class serialVersionUID=-3631035586055025610

      at org.jboss.mq.referenceable.ObjectRefAddr.extractObjectRefFrom(ObjectRefAddr.java:82)

      at org.jboss.mq.referenceable.SpyConnectionFactoryObjectFactory.getObjectInstance(SpyConnectionFactoryObjectFactory.java:45)

      at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)

      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:437)

      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:333)

      at javax.naming.InitialContext.lookup(InitialContext.java:350)

      at logica.SampleUtilities.jndiLookup(SampleUtilities.java:172)

      at logica.SampleUtilities.getQueueConnectionFactory(SampleUtilities.java:80)

      at logica.QueueBrowserExample.main(QueueBrowserExample.java:56)

      Connection problem: java.lang.NullPointerException