1 Reply Latest reply on Oct 22, 2003 3:54 PM by brian.duguid

    JBoss 3.2.2 Scheduler MBean service fails

    brian.duguid

      I have a scheduler MBean with the minimum required classes jar'd in the server/default/lib directory that, when "activated", sends a message to a message-driven bean in a deployed ear to start a process.

      This worked in JBoss 3.2.1, but in 3.2.2 the class in the lib directory fails when trying to lookup ConnectionFactory from initial context. It uses:
      Context context = new InitialContext();
      QueueConnectionFactory factory = (QueueConnectionFactory) context.lookup("ConnectionFactory");

      The exception thrown 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)

      If I delete the jar from the lib, and save the scheduler MBean after the ear file is deployed which has those necessary classes included, it works fine.

      This makes it quite difficult to use the scheduler MBean feature since it doesn't work with the jar in the lib and it doesn't work if the MBean is deployed before the ear (which it is). In other words, if the server restarts, I have to manually re-save the MBean for it work.

      Do I need to be doing something different in 3.2.2? Does anyone have any ideas?

        • 1. Re: JBoss 3.2.2 Scheduler MBean service fails
          brian.duguid

          FYI...I was able to fix it by adding two items to the scheduler mbean xml file. First is add the name of the jar file that has the minimum required classes to run to classpath tag. Second is use a depends tag.

          Which all of it makes sense, but I over looked them since it worked fine in 3.2.1 without those two things.






          jboss.j2ee:module=prm_directory_ejb.jar,service=EjbModule
          true
          fdot.prm.directory.jboss.RefreshStarter
          <!-- 1/7/03 12:00 am -->
          NOW
          604800000
          -1