NullPointerException when upgrading to 2.7.0 with Quartz in JDBC_CMT mode
See original GitHub issueDescribe the bug
I had an app running Quarkus 2.6.1 with Quartz scheduler configured like this:
quarkus.quartz.clustered=true
quarkus.quartz.store-type=jdbc_cmt
after upgrading to 2.7.0 I’m getting this error on boot:
2022-02-05 13:18:12,819 ERROR [io.qua.run.Application] (main) Failed to start application (with profile staging): java.lang.NullPointerException
at io.quarkus.quartz.runtime.QuartzScheduler.<init>(QuartzScheduler.java:206)
at io.quarkus.quartz.runtime.QuartzScheduler_Bean.create(Unknown Source)
at io.quarkus.quartz.runtime.QuartzScheduler_Bean.create(Unknown Source)
at io.quarkus.arc.impl.AbstractSharedContext.createInstanceHandle(AbstractSharedContext.java:101)
at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:29)
at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:26)
at io.quarkus.arc.impl.LazyValue.get(LazyValue.java:26)
at io.quarkus.arc.impl.ComputingCache.computeIfAbsent(ComputingCache.java:69)
at io.quarkus.arc.impl.AbstractSharedContext.get(AbstractSharedContext.java:26)
at io.quarkus.quartz.runtime.QuartzScheduler_Observer_start_09e6c17011ef77dec3e1dd9987380b3d946e3db6.notify(Unknown Source)
at io.quarkus.arc.impl.EventImpl$Notifier.notifyObservers(EventImpl.java:320)
at io.quarkus.arc.impl.EventImpl$Notifier.notify(EventImpl.java:302)
at io.quarkus.arc.impl.EventImpl.fire(EventImpl.java:73)
at io.quarkus.arc.runtime.ArcRecorder.fireLifecycleEvent(ArcRecorder.java:128)
at io.quarkus.arc.runtime.ArcRecorder.handleLifecycleEvents(ArcRecorder.java:97)
at io.quarkus.deployment.steps.LifecycleEventsBuildStep$startupEvent1144526294.deploy_0(Unknown Source)
at io.quarkus.deployment.steps.LifecycleEventsBuildStep$startupEvent1144526294.deploy(Unknown Source)
at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
at io.quarkus.runtime.Application.start(Application.java:101)
at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:104)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:67)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:41)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:120)
at io.quarkus.runner.GeneratedMain.main(Unknown Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at io.quarkus.bootstrap.runner.QuarkusEntryPoint.doRun(QuarkusEntryPoint.java:60)
at io.quarkus.bootstrap.runner.QuarkusEntryPoint.main(QuarkusEntryPoint.java:31)
Please note that the error doesn’t occur with a fresh database (and no qrtz_* tables).
Output of java -version
OpenJDK 11
Quarkus version or git rev
2.7.0
Build tool (ie. output of mvnw --version
or gradlew --version
)
Apache Maven 3.6.3
Issue Analytics
- State:
- Created 2 years ago
- Comments:17 (9 by maintainers)
Top Results From Across the Web
NullPointerException when upgrading Spring Boot to version ...
I upgraded by Spring Boot version from 2.5.4 to 2.6.2. Now my app fails at startup because of this error - see below....
Read more >Scheduling Periodic Tasks with Quartz - Quarkus
Updating the application configuration file The misfire policy can be configured for each job. task-job is the identity of the job.
Read more >JIRA Agile Upgrade Fails with a NullPointerException
When upgrading to JIRA Agile 6.1 from 6.0.8 or lower, Upgrade Task 27 fails with an "Upgrade failed: null" error message and throws...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@jendib Yes, the
_trigger
suffix was removed in this commit in 2.1.CR1. Another workaround would be to append the_trigger
suffix to the@Scheduled#identity()
value (this should result in the same trigger key in 2.7+). Also note that we don’t guarantee the compatibility for quartz clustering accross major and minor versions of Quarkus.Yes, it should go into https://github.com/quarkusio/quarkus/wiki/Migration-Guide-2.1.
@KyriacosP From what I remember this
_trigger
was removed after the 2.x release. I had the same issue too (undocumented breaking change by the way). I may be wrong, but I think the issue I described in this ticket is yet another one. Thanks for the workaround 👍