Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version 2.0.13 is not working with Grails 4.0.0.M2 #107

Open
stefanbozic opened this issue Apr 4, 2019 · 6 comments
Open

version 2.0.13 is not working with Grails 4.0.0.M2 #107

stefanbozic opened this issue Apr 4, 2019 · 6 comments

Comments

@stefanbozic
Copy link

stefanbozic commented Apr 4, 2019

The current version of the plugin seems not to work with Grails 4.0.0.M2

Simply created a test application
grails create-app testQuartz

Added the plugin dependency into build.gradle
compile 'org.grails.plugins:quartz:2.0.13'

The following exception occurs

Caused by: java.lang.NoClassDefFoundError: org/quartz/JobExecutionContext
        at grails.plugins.quartz.JobArtefactHandler.isArtefact(JobArtefactHandler.groovy:50)
        at org.grails.compiler.injection.GlobalGrailsClassInjectorTransformation.visit(GlobalGrailsClassInjectorTransformation.groovy:113)
        at org.gradle.api.internal.tasks.compile.ApiGroovyCompiler.execute(ApiGroovyCompiler.java:179)
        at org.gradle.api.internal.tasks.compile.ApiGroovyCompiler.execute(ApiGroovyCompiler.java:57)
        at org.gradle.api.internal.tasks.compile.GroovyCompilerFactory$DaemonSideCompiler.execute(GroovyCompilerFactory.java:80)
        at org.gradle.api.internal.tasks.compile.GroovyCompilerFactory$DaemonSideCompiler.execute(GroovyCompilerFactory.java:68)
        at org.gradle.api.internal.tasks.compile.daemon.AbstractDaemonCompiler$CompilerCallable.call(AbstractDaemonCompiler.java:86)
        at org.gradle.api.internal.tasks.compile.daemon.AbstractDaemonCompiler$CompilerCallable.call(AbstractDaemonCompiler.java:74)
        at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:42)
        at org.gradle.workers.internal.WorkerDaemonServer.execute(WorkerDaemonServer.java:36)
        at org.gradle.process.internal.worker.request.WorkerAction.run(WorkerAction.java:110)
        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
        at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:175)
        at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:157)
        at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:404)
        ... 3 more
Caused by: java.lang.ClassNotFoundException: org.quartz.JobExecutionContext
        ... 19 more
@mobilemindtec
Copy link

Hi,

I have same problem. A temporary solution is add this dependency:

    compile("org.quartz-scheduler:quartz:2.2.3") {
        exclude group: 'slf4j-api', module: 'c3p0'
    }

@majkelo
Copy link

majkelo commented Jan 19, 2020

All kudos for @mobilemindtec however here is whole working workaround for Grails 4.0.1:

	compile("org.quartz-scheduler:quartz:2.2.3") {
		exclude group: 'slf4j-api', module: 'c3p0'
	}
	compile ('org.grails.plugins:quartz:2.0.13') 

(order of dependencies matters)

@alankar906
Copy link

alankar906 commented Jan 21, 2020

hi
Just add following line
runtime 'org.grails.plugins:quartz:2.0.13'

@srsajid
Copy link

srsajid commented Jan 22, 2020

hi
Just add following line
runtime 'org.grails.plugins:quartz:2.0.13'

didn't work

@arjunkr92
Copy link

arjunkr92 commented Mar 30, 2024

I'm using grails 5.3.4, getting the following error:

[ERROR] org.quartz.core.ErrorLogger - An error occured instantiating job to be executed. job= 'GRAILS_JOBS.xyz.DemoJob'
org.quartz.SchedulerException: Job instantiation failed
	at org.springframework.scheduling.quartz.AdaptableJobFactory.newJob(AdaptableJobFactory.java:47)
	at org.quartz.core.JobRunShell.initialize(JobRunShell.java:127)
	at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:392)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'grails.plugins.quartz.GrailsJobFactory$GrailsJob': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'java.lang.Object' available: more than one 'primary' bean found among candidates

I have added this in build.gradle

implementation ("org.quartz-scheduler:quartz:2.2.3") {
exclude group: 'slf4j-api', module: 'c3p0'
}
implementation ('org.grails.plugins:quartz:2.0.13')

@arjunkr92
Copy link

Jobs started working after I upgrade the grails version to 5.3.5, it does not work in 5.3.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants