3 Replies Latest reply on Jan 3, 2005 1:09 AM by Elias Ross

    java.lang.ClassNotFoundException: No ClassLoaders found

    bw toh Newbie

      I have this in /usr/local/jboss/server/cirebon/deploy/scheduler-service.xml

       <mbean code="org.jboss.varia.scheduler.Scheduler"
       name=":service=Scheduler">
       <attribute name="StartAtStartup">true</attribute>
       <attribute name="SchedulableClass">com.xxx.TS</attribute>
       <attribute name="SchedulableArguments"></attribute>
       <attribute name="SchedulableArgumentTypes"></attribute>
       <attribute name="InitialStartDate">0</attribute>
       <attribute name="SchedulePeriod">30000</attribute>
       <attribute name="InitialRepetitions">-1</attribute>
       </mbean>
      

      But when I startup JBoss I encountered this error.
      2004-12-30 17:21:43,110 INFO [org.jboss.varia.scheduler.Scheduler]
      Failed to find: com.xxx.Text2SMS
      java.lang.ClassNotFoundException: No ClassLoaders found for:
      com.xxx.TS
       at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:161)
      

      I extracted the ear and confirmed that my new java class :
      com/xxx/TS.class
      is in my ear along with the many other class files.

      All other files are able to load.


      My colleague informed me that
      I forgot the
      <depends>
      attribute. It complain the class is not there
      because the ear/war/sar is not yet loaded by JBoss.


      I tried adding
      <depends>
      :
       <mbean code="org.jboss.varia.scheduler.Scheduler"
       name=":service=Scheduler">
       <attribute name="StartAtStartup">true</attribute>
       <attribute name="SchedulableClass">com.xxx.TS</attribute>
       <attribute name="SchedulableArguments"/>
       <attribute name="SchedulableArgumentTypes"/>
       <attribute name="InitialStartDate">0</attribute>
       <attribute name="SchedulePeriod">30000</attribute>
       <attribute name="InitialRepetitions">-1</attribute>
       <depends>jboss.j2ee:service=EARDeployer</depends>
       </mbean>
      

      with values such as :
      <depends>module=aaa.jar,service=EjbModule</depends>
      <depends>service=EARDeployer</depends>
      

      But still face the same problem.
      The new class is in
      aaa.jar


      Pls help.