-
1. Re: Timer not starting from method with @Create annotation.
pmuir Jun 8, 2007 7:53 AM (in response to maniappan)You need to find out why the NPE is thrown - for some reason the as isn't giving you the whole stack trace, wrap the method in a try catch and print the stack trace
-
2. Re: Timer not starting from method with @Create annotation.
maniappan Jun 8, 2007 9:14 AM (in response to maniappan)Hi Pete
I have the exceptions caught for the scheduler, processor methods as well as the place where I invoke the saveAndSchedule() method. Don't see any other exception raised. The exception seems to happen after certain time period(I see all the relevant operations completed on the schedule object by that time like closing the JDBC connection, invalidating the objects etc.) after which the exception pasted by me is thrown at the end.
I am not sure if I saw the right source here, org/jboss/ejb/txtimer/TimerImpl.java code seem to throw this exception on some timeout, not sure what could cause this timeout in my case.
-- Mani. -
3. Re: Timer not starting from method with @Create annotation.
pmuir Jun 8, 2007 10:38 AM (in response to maniappan)2007-06-08 14:36:26,756 ERROR [org.jboss.ejb.txtimer.TimerImpl] Error invoking ejbTimeout: javax.ejb .EJBException: java.lang.NullPointerException:
@Create public void startScheduler() { try { log.info("Entering create now to start the schdeuler"); try{Thread t = new Thread(); t.sleep(10000);} catch(Exception e){} try { MyappScheduleController ysh = (MyappScheduleController) Component.getInstance("myappScheduleHome"); ysh.saveAndSchedule(); } catch (Exception e) { System.out.println("Got the exception while starting time "+e.toString()); } } catch (Exception e) { e.printStackTrace(); } }
-
4. Re: Timer not starting from method with @Create annotation.
maniappan Jun 8, 2007 1:35 PM (in response to maniappan)Tried it, didn't get any exception, got more line in addition to what I posted before..
2007-06-08 22:42:49,066 DEBUG [org.jboss.ejb.txtimer.TimerImpl] Timer was not registered with Tx, resetting state: [id=4,target=[target=jboss.j2ee:service=EJB3,ear=yoscarebase.ear,jar=jboss-seam.jar,name=Dispatcher],remaining=-11966,periode=0,in_timeout] 2007-06-08 22:42:49,066 DEBUG [org.jboss.ejb.txtimer.TimerImpl] setTimerState: expired 2007-06-08 22:42:49,067 DEBUG [org.jboss.ejb.txtimer.TimerImpl] killTimer: [id=4,target=[target=jboss.j2ee:service=EJB3,ear=yoscarebase.ear,jar=jboss-seam.jar,name=Dispatcher],remaining=-11967,periode=0,expired] 2007-06-08 22:42:49,068 DEBUG [org.jboss.ejb.txtimer.GeneralPurposeDatabasePersistencePlugin] Unable to remove timer for: 4