0 Replies Latest reply on Aug 8, 2011 4:12 PM by egufford1

    class not found when starting a schedule

    egufford1

      I have an app that contains a class that implements org.jboss.varia.scheduler.Schedulable. I have the schedule set up to run when the AS comes up, snippet from jboss-service.xml below. I have successfully debugged this code outside of the app server (eclipse/junit). I'm trying to debug this in eclipse by launching the AS in debug. When the AS comes up, I get class not found errors. I've tried to set up dependencies to solve this but that doesn't seem to make a difference. I have looked at the WAR and I can find the class in question right where it should be. War is deployed to $JBOSS_HOME/<my project name>/deploy. What am I missing?

       

      I'm running eclipse Helios, JBoss 5.1 and JBossTools 3.2 (Helios); I've already debugged web services this way, using SoapUI to launch the requests. It's worked like a charm so far. Not sure what I'm messing up, would be grateful for any help. I've attached server.log if it's any help.

       

      15:33:11,722 INFO  [ServerInfo] Java version: 1.6.0_22,Sun Microsystems Inc.

      15:33:11,722 INFO  [ServerInfo] Java Runtime: Java(TM) SE Runtime Environment (build 1.6.0_22-b04)

      15:33:11,722 INFO  [ServerInfo] Java VM: Java HotSpot(TM) Client VM 17.1-b03,Sun Microsystems Inc.

      15:33:11,722 INFO  [ServerInfo] OS-System: Windows XP 5.1,x86

      15:33:11,722 INFO  [ServerInfo] VM arguments: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:4760 -Dprogram.name=JBossTools: JBoss EAP 5.x Runtime -Xms256m -Xmx768m -XX:MaxPermSize=256m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.endorsed.dirs=C:\tools\jboss-as-51\lib\endorsed -Dfile.encoding=Cp1252

      15:33:11,753 INFO  [JMXKernel] Legacy JMX core initialized

      15:33:14,612 INFO  [WebService] Using RMI server codebase: http://localhost:8083/

      15:33:15,034 INFO  [Scheduler] Failed to find: com.att.usop.federation.scheduler.ArgusScheduler

      java.lang.ClassNotFoundException: com.att.usop.federation.scheduler.ArgusScheduler from BaseClassLoader@19155be{vfsfile:/C:/tools/jboss-as-51/server/usop/conf/jboss-service.xml}

      ======================================================================================================

      jboss-service.xml entry (bottom of file, originally cloned from 'default')

       


      <mbean code="org.jboss.varia.scheduler.Scheduler"
             name="jboss.docs:service=ArgusScheduler">


      <depends>jboss.j2ee:service=EARDeployment,url='USOP-R4.ear'</depends>

          <depends>jboss.j2ee:service=EJB3,module=USOP-JPA.jar</depends>

          <depends>jboss.j2ee:service=EJB3,module=USOP-WS.war</depends>


      <!-- START AS SOON AS THE APP SERVER COMES UP -->



      <attribute name="StartAtStartup">true</attribute>


      <!-- CLASS NAME OF THIS SCHEDULED ENTITY -->



      <attribute name="SchedulableClass">com.att.usop.federation.scheduler.ArgusScheduler</attribute>


      <!-- WHATEVER ARGS YOU WANT TO PROVIDE GO HERE -->


      <!-- <attribute name="SchedulableArguments">TheName,123456789</attribute> -->


      <!-- DATA TYPE AND ORDER MUST MATCH TO THE FOREGOING. -->


      <!-- <attribute name="SchedulableArgumentTypes">java.lang.String,long</attribute> -->


      <!-- RUN THIS SCHEDULE AS SOON AS THE SERVER COMES UP -->



      <attribute name="InitialStartDate">NOW</attribute>


      <!-- NUMBER OF MILISECONDS TO WAIT BETWEEN INVOCATIONS -->


      <!-- 8/11 EJG : RUN EVERY 120 SECS.-->



      <attribute name="SchedulePeriod">120000</attribute>


      <!-- NUMBER OF TIMES TO RUN, MINUS ONE MEANS RUN FOREVER. -->


      <attribute name="InitialRepetitions">-1</attribute>

      </mbean>