2 Replies Latest reply on May 25, 2007 2:01 AM by Elias Ross

    " No ClassLoaders found " error when deploying a startup cla

    Navjeet Newbie

      I am trying to deploy a simple start up class at JBoss startup time and it keeps giving the following error:


      [java] Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: com.acme.common.business.taskmanagement.TaskTimerStartup
       [java] at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:306
      )
       [java] at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(Repo
      sitoryClassLoader.java:514)
       [java] at org.jboss.mx.loading.RepositoryClassLoader.loadClass(Reposito
      ryClassLoader.java:408)
       [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
       [java] at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerIm
      pl.java:1204)
       [java] at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerIm
      pl.java:286)
       [java] at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerIm
      pl.java:344)
       [java] at org.jboss.system.ServiceCreator.install(ServiceCreator.java:1
      57)
       [java] at org.jboss.system.ServiceConfigurator.internalInstall(ServiceC
      onfigurator.java:449)
       [java] at org.jboss.system.ServiceConfigurator.install(ServiceConfigura
      tor.java:171)


      The TaskTimerStartup class extends ServiceMBeanSupport and implements TaskTimerMBean interface.

      I have put both these classes and jboss-service.xml in a sar file and deployed it with my ear file. I also added the following entry to application.xml

      <module><java>timer.sar</java></module>


        • 1. Re: Fixed
          Navjeet Newbie

          I have fixed this problem. The problem was that I was not following the naming convention for MBeans. If the service class name is TaskTimersStartupService then the Mbean interface must be named TaskTimersStartupServiceMBean. This information does not seem to be well documented. I hope this helps other people.

          • 2. Re:
            Elias Ross Master

            I believe it's part of the spec for JMX. You can also specify the interface class you want to use, if you don't follow the guidelines, by simply indicating it in the -service.xml file. Check out the DTD for the attribute name.