6 Replies Latest reply on Feb 21, 2003 3:22 PM by hale2jo

    Scheduler not working

    sridharmandava

      Hi,

      I am getting an error message when I start the jboss with the scheduler I have.

      the error is::
      ____
      [Configuration] Could not create MBean :service=Scheduler(org.jboss.util.Schedul
      er)
      [Configuration] java.security.InvalidParameterException: Given class org.jboss.u
      til.Scheduler$ScheduledDataRemover is not valid or not found
      [Configuration] at org.jboss.util.Scheduler.setSchedulableClass(Schedule
      r.java:351)
      [Configuration] at org.jboss.util.Scheduler.(Scheduler.java:120)
      [Configuration] at java.lang.reflect.Constructor.newInstance(Native Meth
      od)
      [Configuration] at com.sun.management.jmx.MBeanServerImpl.internal_insta
      ntiate(MBeanServerImpl.java:2210)
      [Configuration] at com.sun.management.jmx.MBeanServerImpl.createMBean(MB
      eanServerImpl.java:761)
      [Configuration] at org.jboss.configuration.ConfigurationService.create(C
      onfigurationService.java:579)
      [Configuration] at org.jboss.configuration.ConfigurationService.loadConf
      iguration(ConfigurationService.java:381)
      [Configuration] at java.lang.reflect.Method.invoke(Native Method)
      [Configuration] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
      rverImpl.java:1628)
      [Configuration] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
      rverImpl.java:1523)
      [Configuration] at org.jboss.Main.(Main.java:213)
      [Configuration] at org.jboss.Main$1.run(Main.java:127)
      [Configuration] at java.security.AccessController.doPrivileged(Native Me
      thod)
      [Configuration] at org.jboss.Main.main(Main.java:123)

      ____

      I am using JBoss2.4.3
      the mbean element I have added to jboss.jcml is













      If I use the example given in docs that is working fine.

      thanks in advance..

      -Sridhar Mandava

        • 1. Re: Scheduler not working

          I assume you have a class defined something like

          package my.package;

          import org.jboss.util.Schedulable;

          public class ScheduledDataRemover
          {
          public void perform(Date timeOfCall, long remainingRepititions)
          {
          // etc

          your MBean config should look like this:






          <!-- etc -->

          Regards,
          Adrian

          • 2. Re: Scheduler not working

            Sorry, missed the
            implements Schedulable
            on the class definition.
            Regards,
            Adrian

            • 3. Re: Scheduler not working
              thinh

              the package org.jboss.util.Schedulable can not be found.
              I have installed jboss 3.0.2. Could anybody please tell me which jar file contain this package?

              Thank you

              • 4. Re: Scheduler not working

                A co-worker helped me figure this one out. The Schedulable interface is not in org.jboss.util. It is in org.jboss.varia.scheduler which is in /usr/jboss/server/appServer/lib/scheduler-plugin.jar
                So, if that jar file is not in your classpath you have to add it to your classpath in your .bashrc file or in your build.xml file.

                • 5. Re: Scheduler not working

                  A co-worker helped me figure this one out. The Schedulable interface is not in org.jboss.util. It is in org.jboss.varia.scheduler which is in /usr/jboss/server/appServer/lib/scheduler-plugin.jar
                  So, if that jar file is not in your classpath you have to add it to your classpath in your .bashrc file or in your build.xml file.

                  • 6. Re: Scheduler not working

                    A co-worker helped me figure this one out. The Schedulable interface is not in org.jboss.util. It is in org.jboss.varia.scheduler which is in /usr/jboss/server/appServer/lib/scheduler-plugin.jar
                    So, if that jar file is not in your classpath you have to add it to your classpath in your .bashrc file or in your build.xml file.