2 Replies Latest reply on Sep 22, 2008 10:34 AM by lpmon

    Varia Scheduler cannot find class at startup

    lpmon Novice

      I have seen this before and created a work-around. I have since changed my deployment layout (due to EJB3/Seam) and now my work-around does not work.

      in schedule-service.xml:


      true
      com.shockwatch.swevents.rdp.extract.RDPAutoExtract
      09/16/2008 6:38
      120000
      -1


      The SchedulableClass is inside a jar that is inside an ear. How do I tell where to find the class?

      Here is my kludge that used to work. It touches the xml config file which causes JBoss to reload it (after the ear loaded and class is available).

      /**
      * KLUDGE: could not get dependency to work for scheduler service, cause it to reload config
      */
      private void touchScheduler()
      {
      try
      {
      Class.forName("com.shockwatch.swevents.rdp.extract.RDPAutoExtract");
      String fileSep=System.getProperty("file.separator");
      String deployDir=System.getProperty("jboss.server.home.dir") + fileSep + "deploy" + fileSep;
      File f = new File(deployDir + "scheduler-service.xml");
      f.setLastModified(System.currentTimeMillis());
      }
      catch (Exception ex)
      {
      ex.printStackTrace(System.err);
      }
      }

        • 1. Re: Varia Scheduler cannot find class at startup
          lpmon Novice

          Forgot to give version:

          JBoss AS 4.0.5GA

          and error:

          --- MBeans waiting for other MBeans ---
          ObjectName: RDPExtract:service=Scheduler
          State: FAILED
          Reason: org.jboss.deployment.DeploymentException: Exception setting attribute javax.management.Attribute@15330ea on mbean RDPExtract:service=Scheduler; - nested throwable: (java.security.InvalidParameterException: Given class com.shockwatch.swevents.rdp.extract.RDPAutoExtract is not not found)

          --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
          ObjectName: RDPExtract:service=Scheduler
          State: FAILED
          Reason: org.jboss.deployment.DeploymentException: Exception setting attribute javax.management.Attribute@15330ea on mbean RDPExtract:service=Scheduler; - nested throwable: (java.security.InvalidParameterException: Given class com.shockwatch.swevents.rdp.extract.RDPAutoExtract is not not found)


          2008-09-16 19:06:37,284 ERROR [org.jboss.deployment.scanner.URLDeploymentScanner] Incomplete Deployment listing:

          --- MBeans waiting for other MBeans ---
          ObjectName: RDPExtract:service=Scheduler
          State: FAILED
          Reason: org.jboss.deployment.DeploymentException: Exception setting attribute javax.management.Attribute@7ae145 on mbean RDPExtract:service=Scheduler; - nested throwable: (java.security.InvalidParameterException: Given class com.shockwatch.swevents.rdp.extract.RDPAutoExtract is not not found)

          --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
          ObjectName: RDPExtract:service=Scheduler
          State: FAILED
          Reason: org.jboss.deployment.DeploymentException: Exception setting attribute javax.management.Attribute@7ae145 on mbean RDPExtract:service=Scheduler; - nested throwable: (java.security.InvalidParameterException: Given class com.shockwatch.swevents.rdp.extract.RDPAutoExtract is not not found)


          • 2. SOLVED Varia Scheduler cannot find class at startup
            lpmon Novice

            I missed a section in the wiki that explained how to configure a schedule WITHIN an app.

            Key point: scheduler-service.xml file is in /META-INF

            See last section in wiki: http://wiki.jboss.org/wiki/Scheduler