[ https://issues.apache.org/jira/browse/ODE-1012?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14248550#comment-14248550 ] Igor Vorobiov commented on ODE-1012: ------------------------------------ 1) As I mentioned above the problem happens when we call scheduleMapSerializableRunnable. This method calls following methods sequence: {code} org.apache.ode.scheduler.simple.SimpleScheduler.scheduleMapSerializableRunnable() => schedulePersistedJob() => _db.insertJob() + addTodoOnCommit() => enqueue(Job) => runJob(job) => _exec.submit(new RunJob(job, _jobProcessor)) {code} As we can see *_jobProcessor* is used to run *ProcessCleanUpRunnable*. But as I understand for runnable we should use *_polledRunnableProcessor*. My fix is adding check for job processor type depends on DetailsExt: {code:title=org.apache.ode.scheduler.simple.SimpleScheduler.java|borderStyle=solid} protected void runJob(final Job job) { if (job.detail.getDetailsExt().get("runnable") != null) { _exec.submit(new RunJob(job, _polledRunnableProcessor)); } else { _exec.submit(new RunJob(job, _jobProcessor)); } } {code} 2) Other problem related to *ClassCastException: java.lang.Long cannot be cast to java.lang.String* is caused by incorrect casting Long to String in: {code:title=org.apache.ode.scheduler.simple.JdbcDelegate.java|borderStyle=solid} public List dequeueImmediate(String nodeId, long maxtime, int maxjobs) throws DatabaseException { .... if (detailsExt.get("pid") != null) { details.processId = (String) detailsExt.get("pid"); } .... } {code} ((DeferredProcessInstanceCleanable)proc).getId() returns Long so when this value is taken from db it is Long. Solution is call toString for retrieved from db value: *details.processId = detailsExt.get("pid").toString();* > Error in the ode log under hibernate > ------------------------------------ > > Key: ODE-1012 > URL: https://issues.apache.org/jira/browse/ODE-1012 > Project: ODE > Issue Type: Bug > Components: Deployment > Affects Versions: 1.3.5, 1.3.6 > Environment: - Windows 7 > - Apache ODE 1.3.6 > - Microsoft® SQL Server® 2008 R2 SP2 - Express Edition > Reporter: Igor Vorobiov > Priority: Minor > Fix For: 1.3.7, 1.4 > > Attachments: ODE.log, ODESchema.sql, ODE_with_Bitronix_tx.log, ode-axis2.properties > > > There is still the problem in ode under hibernate which was mentioned in: > http://apache-ode.996305.n3.nabble.com/problem-with-ode-under-hibernate-td16241.html#none > Steps to reproduce: > 1) setup ODE under hibernate and point it to external sql server DB(ode-axis2.properties and ODE schema creation script are attached); > 2) deploy HelloWorld2 (copy to ode\WEB-INF\processes with name HelloWorld2-1 or deploy it by web UI); > 3) redeploy HelloWorld2 (copy to ode\WEB-INF\processes with name HelloWorld2-2 or deploy it by web UI); > Expected: no errors in the log. > Actual: following error in the log: > [2013-12-22 21:12:55,010] [ERROR] [org.apache.ode.bpel.engine.BpelEngineImpl] - Scheduled job failed; jobDetail=JobDetails( instanceId: null mexId: null processId: null type: null channel: nul > l correlatorId: null correlationKeySet: null retryCount: null inMem: null detailsExt: {runnable=org.apache.ode.bpel.engine.ProcessCleanUpRunnable@615c1ae3, pid=1}) > java.lang.IllegalArgumentException: id to load is required for loading > at org.hibernate.event.LoadEvent.(LoadEvent.java:51) > at org.hibernate.event.LoadEvent.(LoadEvent.java:33) > at org.hibernate.impl.SessionImpl.get(SessionImpl.java:812) > at org.hibernate.impl.SessionImpl.get(SessionImpl.java:808) > at org.apache.ode.daohib.bpel.BpelDAOConnectionImpl._getInstance(BpelDAOConnectionImpl.java:201) > at org.apache.ode.daohib.bpel.BpelDAOConnectionImpl.getInstance(BpelDAOConnectionImpl.java:145) > at org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(BpelEngineImpl.java:416) > at org.apache.ode.bpel.engine.BpelServerImpl.onScheduledJob(BpelServerImpl.java:450) > at org.apache.ode.scheduler.simple.SimpleScheduler$RunJob$1.call(SimpleScheduler.java:523) > at org.apache.ode.scheduler.simple.SimpleScheduler$RunJob$1.call(SimpleScheduler.java:517) > at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:289) > at org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleScheduler.java:244) > at org.apache.ode.scheduler.simple.SimpleScheduler$RunJob.call(SimpleScheduler.java:517) > at org.apache.ode.scheduler.simple.SimpleScheduler$RunJob.call(SimpleScheduler.java:501) > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) > at java.util.concurrent.FutureTask.run(FutureTask.java:138) > at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > at java.lang.Thread.run(Thread.java:662) > Seems that the error appears when process becomes RETIRED. > I also attached ODE.log -- This message was sent by Atlassian JIRA (v6.3.4#6332)