You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Ron Smeral (JIRA)" <ji...@apache.org> on 2015/01/19 15:51:34 UTC

[jira] [Created] (DELTASPIKE-824) Scheduled job execution fails without manually added cdictrl dependency

Ron Smeral created DELTASPIKE-824:
-------------------------------------

             Summary: 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
            Reporter: Ron Smeral


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)