Scheduler Exception being raised on Module Start

1 view
Skip to first unread message

varun....@gmail.com

unread,
Feb 25, 2013, 8:39:12 AM2/25/13
to d...@openmrs.org

Hello,

I intend to write an OpenMrs module that build on top of the Event Module. I've started by generating an empty module using the module maven archetype. When I try to upload this basic skeleton module an exception is raised and swallowed in the saveToMemento method call. 

StackTrace - 

INFO - LoggingAdvice.invoke(117) |2013-02-22 15:06:18,127| In method SchedulerService.saveToMemento. Arguments:

ERROR - LoggingAdvice.invoke(126) |2013-02-22 15:06:18,128| An error occurred while executing this method. Error message: id to load is required for loading

java.lang.IllegalArgumentException: id to load is required for loading

at org.hibernate.event.LoadEvent.<init>(LoadEvent.java:89)

at org.hibernate.event.LoadEvent.<init>(LoadEvent.java:61)

at org.hibernate.impl.SessionImpl.get(SessionImpl.java:1002)

at org.hibernate.impl.SessionImpl.get(SessionImpl.java:998)

at org.openmrs.scheduler.db.hibernate.HibernateSchedulerDAO.getTask(HibernateSchedulerDAO.java:77)

at org.openmrs.scheduler.timer.TimerSchedulerServiceImpl.getTask(TimerSchedulerServiceImpl.java:356)

at org.openmrs.scheduler.timer.TimerSchedulerServiceImpl.getScheduledTasks(TimerSchedulerServiceImpl.java:331)

at org.openmrs.scheduler.timer.TimerSchedulerServiceImpl.saveToMemento(TimerSchedulerServiceImpl.java:437)

......


Code (TimerSchedulerServiceImpl.java in openmrs-core) -

    catch (SchedulerException e) {
// just swallow exceptions -  Why are exceptions swallowed?
log.debug("Failed to stop task while saving memento " + task.getName(), e);
}
 

Why is the Id not present? What does it mean (and it's implications) when this occurs when a module is started?

Thanks,
Varun

Darius Jazayeri

unread,
Feb 25, 2013, 7:17:40 PM2/25/13
to dev
Hi Varun,

I would suggest putting a breakpoint at HibernateSchedulerDAO.java:77 and running OpenMRS under the debugger, then checking what the specific details of this error are, i.e. which task is being fetched?

-Darius


--
OpenMRS Developers: http://go.openmrs.org/dev
Post: d...@openmrs.org
Unsubscribe: dev+uns...@openmrs.org
Manage your OpenMRS subscriptions at https://id.openmrs.org/
 
 

Reply all
Reply to author
Forward
0 new messages