Hello,

We are trying to use the fulcrum schedular service. We managed to get the
database part working (at least we think we do) but now when we want to add
a job to the service we always get the following exception :

java.lang.NullPointerException
        at org.apache.fulcrum.BaseService.getCategory(BaseService.java:251)
        at
org.apache.fulcrum.schedule.TurbineSchedulerService.addJob(TurbineSchedulerS
ervice.java:177)
        at
com.siemens.square.ejb.workflow.scheduler.TestScheduler.main(TestScheduler.j
ava:43)

When we take a look at the code it seems that the service is missing a name.
How must we initialize fulcrum in standalone mode in order to use the
schedulerService. The following is the code we use that generates this
output. Does anybody have any idea

Thanks

public class TestScheduler{
        public static void main (String[] args) {

                try {
        
Torque.init("/home/erik/square/src/com/siemens/square/ejb/workflow/scheduler
/Torque.properties");
                        System.out.println("database name =
"+Torque.getDefaultDB());
                        Torque.getConnection(Torque.getDefaultDB());

                                                
                        TurbineSchedulerService s = new
TurbineSchedulerService();      
                        s.init();
                        System.out.println(s.isInitialized());

                        JobEntry je = new
JobEntry(30,-1,-1,-1,-1,"TestJob");
                        s.addJob(je);
                } catch (Exception e) {
                        e.printStackTrace();
                } // end of catch               

        } // end of main ()
                
}



Erik Kazandjian - Software Engineer
Siemens Atea IC D AS B5
++32 14 252962
e-mail : [EMAIL PROTECTED]



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to