2 Replies Latest reply on Oct 23, 2003 12:47 AM by stephanenicoll

    Looking up ConnectionFactory returns javax.naming.NamingExce

    brian.duguid

      I'm using JBoss 3.2.2 trying to get the QueueConnectionFactory by looking up "ConnectionFactory." This process has worked for me in 3.2.1 and the very first time using 3.2.2. RecursiveSearch is true and the DEBUG log reflects that.

      Error is thrown on second line of this code:
      Context context = new InitialContext();
      QueueConnectionFactory factory = (QueueConnectionFactory) context.lookup("ConnectionFactory");

      The exception is:

      javax.naming.NamingException: Could not dereference object. Root exception is
      java.lang.NullPointerException
      at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:119)
      at org.jboss.mx.loading.UnifiedClassLoader3.loadClassImpl(UnifiedClassLoader3.java:169)
      at org.jboss.mx.loading.UnifiedClassLoader3.loadClass(UnifiedClassLoader3.java:123)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:217)
      at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:42)
      at javax.naming.spi.NamingManager.getObjectFactoryFromReference(NamingManager.java:129)
      at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:299)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:620)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:507)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)
      at fdot.prm.directory.jboss.AbstractStarter.sendMessage(AbstractStarter.java:70)
      at fdot.prm.directory.jboss.RefreshStarter.perform(RefreshStarter.java:20)
      at org.jboss.varia.scheduler.Scheduler$Listener.handleNotification(Scheduler.java:1263)
      at org.jboss.mx.server.NotificationListenerProxy.handleNotification(NotificationListenerProxy.java:69)
      at javax.management.NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterSupport.java:95)
      at javax.management.timer.Timer.sendNotifications(Timer.java:441)
      at javax.management.timer.Timer.access$000(Timer.java:31)
      at javax.management.timer.Timer$RegisteredNotification.doRun(Timer.java:612)
      at org.jboss.mx.util.SchedulableRunnable.run(SchedulableRunnable.java:164)
      at org.jboss.mx.util.ThreadPool$Worker.run(ThreadPool.java:225)

      Any ideas?

      -Brian