[jboss-jira] [JBoss JIRA] (DROOLS-2150) QuartzSchedulerService NullPointerException
Csaba Házi (JIRA)
issues at jboss.org
Fri Nov 24 09:15:00 EST 2017
[ https://issues.jboss.org/browse/DROOLS-2150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Csaba Házi updated DROOLS-2150:
-------------------------------
Steps to Reproduce:
I have an example rule with Complex Event Processing:
rule "more than 3 processes in 5 minutes"
when
Number(intValue > 3) from accumulate(
pie: ProcessInstanceEvent(
processId == "showcase_process",
state == ProcessInstance.STATE_ACTIVE)
over window:time(5m),
count(pie)
)
then
System.out.println("Send warning: " + drools.getRule().getName());
notifier.sendWarning(drools.getRule().getName());
end
When a new event is fired the QuartzSchedulerService tries to persist TimerJobInstance at
org.jbpm.process.core.timer.impl.QuartzSchedulerService.internalSchedule(TimerJobInstance) method. During serialization NotSerializableException occurs and call the internalSchedule(...) to create InmemoryTimerJobInstanceDelegate.
The cause of NotSerializableException: org.jbpm.persistence.timer.GlobalJPATimerJobFactoryManager.createTimerJobInstance(Job, JobContext, Trigger, JobHandle, InternalSchedulerService) SelfRemovalJob reference to org.drools.core.reteoo.ObjectTypeNode$ExpireJob that is not serializable.
Restart the apllication and Quartz loads triggers from database. When the trigger is fired I got NPE exception:
Caused by: java.lang.NullPointerException at org.jbpm.process.core.timer.impl.QuartzSchedulerService$InmemoryTimerJobInstanceDelegate.call(QuartzSchedulerService.java:401)
org.drools.core.reteoo.ObjectTypeNode.ExpireJob is not Serializable unlike org.jbpm.process.instance.timer.TimerManager.ProcessJob.
was:
I have an example rule with Complex Event Processing:
rule "more than 3 processes in 5 minutes"
when
Number(intValue > 3) from accumulate(
pie: ProcessInstanceEvent(
processId == "showcase_process",
state == ProcessInstance.STATE_ACTIVE)
over window:time(5m),
count(pie)
)
then
System.out.println("Send warning: " + drools.getRule().getName());
notifier.sendWarning(drools.getRule().getName());
end
When a new event is fired the QuartzSchedulerService tries to persist TimerJobInstance at
org.jbpm.process.core.timer.impl.QuartzSchedulerService.internalSchedule(TimerJobInstance) method. During serialization NotSerializableException occurs and call the internalSchedule(...) to create InmemoryTimerJobInstanceDelegate.
The cause of NotSerializableException: org.jbpm.persistence.timer.GlobalJPATimerJobFactoryManager.createTimerJobInstance(Job, JobContext, Trigger, JobHandle, InternalSchedulerService) SelfRemovalJob reference to org.drools.core.reteoo.ObjectTypeNode$ExpireJob that is not serializable.
Restart the apllication and Quartz loads triggers from database. When the trigger is fired I got NPE exception:
Caused by: java.lang.NullPointerException at org.jbpm.process.core.timer.impl.QuartzSchedulerService$InmemoryTimerJobInstanceDelegate.call(QuartzSchedulerService.java:401)
> QuartzSchedulerService NullPointerException
> -------------------------------------------
>
> Key: DROOLS-2150
> URL: https://issues.jboss.org/browse/DROOLS-2150
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 6.5.0.Final
> Environment: jBPM 6 and Quartz timer
> Reporter: Csaba Házi
> Assignee: Mario Fusco
>
> 2017-11-23 10:52:11,064 INFO [org.quartz.core.JobRunShell] (JbpmScheduler_Worker-4) Job jbpm.Timer-ExpireJobContext-6 threw a JobExecutionException: : org.quartz.JobExecutionException: Exception when executing scheduled job [See nested exception: java.lang.NullPointerException]
> at org.jbpm.process.core.timer.impl.QuartzSchedulerService$QuartzJob.execute(QuartzSchedulerService.java:341)
> at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
> at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
> Caused by: java.lang.NullPointerException
> at org.jbpm.process.core.timer.impl.QuartzSchedulerService$InmemoryTimerJobInstanceDelegate.call(QuartzSchedulerService.java:401)
> at org.jbpm.process.core.timer.impl.QuartzSchedulerService$InmemoryTimerJobInstanceDelegate.call(QuartzSchedulerService.java:348)
> at org.jbpm.process.core.timer.impl.QuartzSchedulerService$QuartzJob.execute(QuartzSchedulerService.java:322)
> ... 2 more
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the jboss-jira
mailing list