[ 
https://issues.apache.org/jira/browse/DELTASPIKE-824?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gerhard Petracek resolved DELTASPIKE-824.
-----------------------------------------
       Resolution: Won't Fix
    Fix Version/s:     (was: 1.2.2)

#1 we need the cdi-ctrl module at least to start the cdi-container
(without that the whole module wouldn't make sense at all)
#2 since the impl. can't be defined (since users have to choose), users need to 
configure the impl in any case -> imo there shouldn't be an issue with adding 
the dependency to the api as well
#3 our internal (mocked) tests are just needed that way, because we can't rely 
on tests based on timeouts (to be on the safe side we would need timeouts of 
more than 1+ sec. which would slow down the whole build and would lead to 
instability)

-> please create a new ticket to improve the documentation about it.

> 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