| From | Sent On | Attachments |
|---|---|---|
| Balasubramanian, Saravanan | Oct 26, 2004 3:18 pm |
| Subject: | [Opensymphony-workflow] RE: Possible bug: Osworkflow + Hibernate + Quartz | |
|---|---|---|
| From: | Balasubramanian, Saravanan (sbal...@harris.com) | |
| Date: | Oct 26, 2004 3:18:21 pm | |
| List: | net.java.dev.osworkflow.users | |
Figured out the problem. I created a 'new DefaultConfiguration()' and therefore the persistenceArgs was not saved in the static instance. When using DefaultConfiguration.INSTANCE everything worked fine.
- Bala
-----Original Message----- From: Balasubramanian, Saravanan Sent: Tuesday, October 26, 2004 2:15 PM To: 'use...@osworkflow.dev.java.net' Subject: Possible bug: Osworkflow + Hibernate + Quartz
When using Hibernate along with OSWorkflow, we add the following line so that OSWorkflow can access Hibernate's SessionFactory. InitialContext context = new InitialContext(); SessionFactory factory = (SessionFactory) context.lookup("java:/hibernate/SessionFactory"); config.getPersistenceArgs().put("sessionFactory", factory);
When I run a Job using Quartz, a new Workflow instance is created in LocalWorkflowJob. But the new instance does not contain the persistenceArgs. Because of this, I feel I am getting the following error. I am using OSWorkflow 2.7.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.NullPointerException] at org.quartz.core.JobRunShell.run(JobRunShell.java:151) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:386) * Nested Exception (Underlying Cause) --------------- java.lang.NullPointerException at com.opensymphony.workflow.spi.hibernate.HibernateWorkflowStore.init(HibernateW orkflowStore.java:228) at com.opensymphony.workflow.config.DefaultConfiguration.getWorkflowStore(Default Configuration.java:86) at com.opensymphony.workflow.AbstractWorkflow.getPersistence(AbstractWorkflow.jav a:775) at com.opensymphony.workflow.AbstractWorkflow.executeTriggerFunction(AbstractWork flow.java:561) at com.opensymphony.workflow.timer.LocalWorkflowJob.execute(LocalWorkflowJob.java :34) at org.quartz.core.JobRunShell.run(JobRunShell.java:147) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:386)
- Bala





