4 Replies Latest reply on May 22, 2002 11:20 AM by csanche7

    Configuration service - java.lang.NoClassDefFoundError error

    angelawhelan

      hi all,
      I am trying to run the BroadCastUser MBean example from Chapter 3 from the JBoss JMX book, but when I start JBoss I get the following error :

      --------------------------------------------------------

      [ERROR,ConfigurationService] Could not create MBean Example:name=blah(imtf.ch.amon.eventtest.BroadCastingUser)
      java.lang.NoClassDefFoundError: imtf/ch/amon/eventtest/BroadCastingUser (wrong name: imtf/ch/amon/eventtest/BroadcastingUser)
      at java.lang.ClassLoader.defineClass0(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
      at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
      at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
      at javax.management.loading.MLet.findClass(MLet.java:775)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
      at com.sun.management.jmx.MBeanServerImpl.findClass(MBeanServerImpl.java:2466)
      at com.sun.management.jmx.MBeanServerImpl.createMBean(MBeanServerImpl.java:751)
      at org.jboss.configuration.ConfigurationService.create(ConfigurationService.java:683)
      at org.jboss.configuration.ConfigurationService.loadConfiguration(ConfigurationService.java:461)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.Main.(Main.java:200)
      at org.jboss.Main$1.run(Main.java:110)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.jboss.Main.main(Main.java:106)

      ---------------------------------------------------------

      The error would imply that it is caused by the fact that the class BroadCastUser MBean is not present in the JAR in the JBoss/lib/ext directory. But I have checked and the class is in the JAR file.

      Does anyone have any ideas on this ? Thanks very much,
      A.