"Manualy" starting Scheduler -> NullpointerException
erlendjboss Apr 4, 2003 12:28 PMHi there!
I'm pretty new to Jboss and this forum, so is this the correct forum for this issue ?
I found some posting in this forum for schedule so I took a chance :-)
Anyway .. I use JBoss 3.0.6 and have tried the schedule example in the 3.0 pdf book. That's just working fine, but when I try to start a new schedule inside another class "manualy" ... I then just get a NullpointerException ... and I'm stuck.
I first start up the Schedule example in the chap10 ... then from it's constructor I create a Catalog object which try to start a new schedule task "manualy".
Here is my case and class:
public class Catalog implements Schedulable
...
public void startSchedule() {
Scheduler sc = new Scheduler(
"no.test.Catalog",
"Catalog2,test,5500,7500,15000",
"java.lang.String,java.lang.String,long,long,long",
"NOW",
10000L,
-1L);
sc.startSchedule();
---
But after a few seconds it crash at the last line:
17:48:02,763 ERROR [Scheduler] operation failed
java.lang.NullPointerException
at org.jboss.varia.scheduler.Scheduler.startSchedule(Scheduler.java:339)
at no.test..Catalog.startSchedule(Catalog.java:193)
at org.jboss.chap10.ex2.ExSchedulable.(ExSchedulable.java:41)
at java.lang.reflect.Constructor.newInstance(Native Method)
at org.jboss.varia.scheduler.Scheduler.startSchedule(Scheduler.java:286)
at org.jboss.varia.scheduler.Scheduler.startService(Scheduler.java:1127)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:165)
at java.lang.reflect.Method.invoke(Native Method)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:1003)
at $Proxy4.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:413)
at java.lang.reflect.Method.invoke(Native Method)
....
??? Do anyone have a clue of what the "nullpointer" should be ?? Do I need to set some other params from the set list of methods Scheduler have ?? hmm
I just have one jboss-service.xml file for the org.jboss.chap10.ex2.ExSchedulable ... file. I don't have one for no.test.Catalog since I think it's enough to set the params in the Scheduler constructor, or have a misunderstood it complety ?? :-)
Thank you very much for your help!
Regards,
Erlend