[ 
https://issues.apache.org/jira/browse/DELTASPIKE-1002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14952549#comment-14952549
 ] 

Patrick Huang commented on DELTASPIKE-1002:
-------------------------------------------

{code}
11:15:19,001 INFO  [org.zanata.job.CdiAwareQuartzJob] 
(DefaultQuartzScheduler_Worker-1) === >> firing job at: Mon Oct 12 11:15:19 
AEST 2015
11:15:19,001 INFO  [org.zanata.job.CdiAwareQuartzJob] 
(DefaultQuartzScheduler_Worker-1) === >> job JobDetail 
'DEFAULT.CdiAwareQuartzJob':  jobClass: 'org.zanata.job.CdiAwareQuartzJob 
concurrentExectionDisallowed: false persistJobDataAfterExecution: false 
isDurable: false requestsRecovers: false finished
11:15:19,001 ERROR [org.quartz.core.ErrorLogger] 
(DefaultQuartzScheduler_Worker-1) Unable to notify JobListener(s) of Job that 
was executed: (error will be ignored). trigger= 
DEFAULT.6da64b5bd2ee-57914939-eb15-40df-a0c6-e836f17ee3ad job= 
DEFAULT.CdiAwareQuartzJob: org.quartz.SchedulerException: JobListener 
'org.apache.deltaspike.scheduler.impl.QuartzScheduler$InjectionAwareJobListener'
 threw exception: null [See nested exception: java.lang.NullPointerException]
        at 
org.quartz.core.QuartzScheduler.notifyJobListenersWasExecuted(QuartzScheduler.java:1987)
 [quartz-2.2.1.jar:]
        at 
org.quartz.core.JobRunShell.notifyJobListenersComplete(JobRunShell.java:340) 
[quartz-2.2.1.jar:]
        at org.quartz.core.JobRunShell.run(JobRunShell.java:224) 
[quartz-2.2.1.jar:]
        at 
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) 
[quartz-2.2.1.jar:]
Caused by: java.lang.NullPointerException
        at 
org.apache.deltaspike.scheduler.impl.QuartzScheduler$JobListenerContext.stopStartedScopes(QuartzScheduler.java:446)
 [deltaspike-scheduler-module-impl-1.4.1.jar:1.4.1]
        at 
org.apache.deltaspike.scheduler.impl.QuartzScheduler$JobListenerContext.access$400(QuartzScheduler.java:420)
 [deltaspike-scheduler-module-impl-1.4.1.jar:1.4.1]
        at 
org.apache.deltaspike.scheduler.impl.QuartzScheduler$InjectionAwareJobListener.stopStartedScopes(QuartzScheduler.java:413)
 [deltaspike-scheduler-module-impl-1.4.1.jar:1.4.1]
        at 
org.apache.deltaspike.scheduler.impl.QuartzScheduler$InjectionAwareJobListener.jobWasExecuted(QuartzScheduler.java:405)
 [deltaspike-scheduler-module-impl-1.4.1.jar:1.4.1]
        at 
org.quartz.core.QuartzScheduler.notifyJobListenersWasExecuted(QuartzScheduler.java:1985)
 [quartz-2.2.1.jar:]
        ... 3 more
{code}

First 2 info log lines indicates the job has been executed and finished. It 
then throws the exception.

> NPE when job startScopes is set to empty
> ----------------------------------------
>
>                 Key: DELTASPIKE-1002
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-1002
>             Project: DeltaSpike
>          Issue Type: Bug
>          Components: Scheduler
>    Affects Versions: 1.4.1
>            Reporter: Patrick Huang
>            Priority: Minor
>
> When setting a job to start empty scope, it will trigger a NPE when trying to 
> destroy contextControl.
> In org.apache.deltaspike.scheduler.impl.QuartzScheduler.JobListenerContext it 
> doesn't seem to initialize contextControl when start scope is emtpy. 
> Therefore when invoking stopStartedScopes(), it will cause a NPE.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to