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

John D. Ament commented on DELTASPIKE-824:
------------------------------------------

IMHO, we need to separate out the concerns of starting contexts with the 
container controller itself.  We have discussed this on the list before, and 
honestly it's the approach we're taking thus far in CDI 2.0.  It would be 
better to introduce those as separate APIs and separate dependency trees (to 
avoid unneeded dependencies).

We can still ship the old coordinates w/ shaded JARs and separate out container 
control from context control, to allow this use case to work better.



> Scheduled job execution fails without manually added cdictrl dependency
> -----------------------------------------------------------------------
>
>                 Key: DELTASPIKE-824
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-824
>             Project: DeltaSpike
>          Issue Type: Bug
>          Components: Scheduler
>    Affects Versions: 1.2.1
>         Environment: JBoss EAP 6.3
>            Reporter: Ron Smeral
>            Assignee: Gerhard Petracek
>            Priority: Minor
>         Attachments: ds-scheduler-cdictrl-dependency.zip
>
>
> In an application which bundles Scheduler module, if cdictrl is not manually 
> added as a dependency to the archive, the job execution fails due to missing 
> {{ContextControl}} class:
> {noformat}
> 15:37:50,437 ERROR [org.quartz.simpl.SimpleThreadPool] 
> (DefaultQuartzScheduler_Worker-2) Error while executing the Runnable: : 
> java.lang.NoClassDefFoundError: org/apache/deltaspike/cdise/api/ContextControl
>       at 
> org.apache.deltaspike.scheduler.impl.QuartzScheduler$JobListenerContext.startContexts(QuartzScheduler.java:417)
>  [deltaspike-scheduler-module-impl-1.2.1.jar:1.2.1]
>       at 
> org.apache.deltaspike.scheduler.impl.QuartzScheduler$InjectionAwareJobListener.jobToBeExecuted(QuartzScheduler.java:362)
>  [deltaspike-scheduler-module-impl-1.2.1.jar:1.2.1]
>       at 
> org.quartz.core.QuartzScheduler.notifyJobListenersToBeExecuted(QuartzScheduler.java:1945)
>  [quartz-2.2.1.jar:]
>       at 
> org.quartz.core.JobRunShell.notifyListenersBeginning(JobRunShell.java:324) 
> [quartz-2.2.1.jar:]
>       at org.quartz.core.JobRunShell.run(JobRunShell.java:173) 
> [quartz-2.2.1.jar:]
>       at 
> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) 
> [quartz-2.2.1.jar:]
> {noformat}
> The {{deltaspike-scheduler-module-impl}} POM has a {{provided}} dependency to 
> {{deltaspike-cdictrl-api}}.
> Ideally, the execution would only fail on CNFE if the 
> {{@Scheduled(startScopes)}} is used.
> Alternatively, the {{deltaspike-cdictrl-api}} could be {{compile}}-scoped so 
> that it gets automatically included in the archive.
> If none of this is possible, it should be documented in 
> http://deltaspike.apache.org/documentation/scheduler.html that the cdictrl 
> dependency always needs to be added manually.
> The tests did not catch this, since they only use a mocked scheduler which 
> does not depend on ContextControl, so the tests might need amending as well.



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

Reply via email to