-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
Describe the bug
Adding the dependency camel-quarkus-quartz to a Quarkus application that already uses quarkus-quartz causes a startup failure:
UnsatisfiedResolutionException: No bean found for required type
[interface io.quarkus.quartz.QuartzScheduler] and qualifiers [[]]
Prerequisite: The property quarkus.scheduler.use-composite-scheduler=true must be set. Without this setting, the combination works fine.
Root cause: When use-composite-scheduler=true is set, the QuartzSchedulerImpl bean is apparently not registered with the type io.quarkus.quartz.QuartzScheduler in the CDI container. However, CamelQuartzRecorder$QuartzAutowiredLifecycleStrategy attempts to resolve exactly this bean type at runtime via Arc.container().select(QuartzScheduler.class) — and fails with
ERROR [io.quarkus.runtime.Application] (Quarkus Main Thread) Failed to start application: java.lang.RuntimeException: Failed to start quarkus
at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
at io.quarkus.runtime.Application.start(Application.java:116)
at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:119)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:79)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:50)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:143)
at io.quarkus.runner.GeneratedMain.main(Unknown Source)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at io.quarkus.runner.bootstrap.StartupActionImpl$1.run(StartupActionImpl.java:151)
at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: jakarta.enterprise.inject.UnsatisfiedResolutionException: No bean found for required type [interface io.quarkus.quartz.QuartzScheduler] and qualifiers [[]]
at org.apache.camel.quarkus.core.CamelBootstrapRecorder.start(CamelBootstrapRecorder.java:55)
at io.quarkus.runner.recorded.CamelBootstrapProcessor$boot173480958.deploy_0(Unknown Source)
at io.quarkus.runner.recorded.CamelBootstrapProcessor$boot173480958.deploy(Unknown Source)
... 11 more
Caused by: java.lang.RuntimeException: jakarta.enterprise.inject.UnsatisfiedResolutionException: No bean found for required type [interface io.quarkus.quartz.QuartzScheduler] and qualifiers [[]]
at org.apache.camel.quarkus.main.CamelMainRuntime.start(CamelMainRuntime.java:65)
at org.apache.camel.quarkus.core.CamelBootstrapRecorder.start(CamelBootstrapRecorder.java:53)
... 13 more
Caused by: jakarta.enterprise.inject.UnsatisfiedResolutionException: No bean found for required type [interface io.quarkus.quartz.QuartzScheduler] and qualifiers [[]]
at io.quarkus.arc.impl.InstanceImpl.bean(InstanceImpl.java:288)
at io.quarkus.arc.impl.InstanceImpl.getHandle(InstanceImpl.java:246)
at org.apache.camel.quarkus.component.quartz.CamelQuartzRecorder$QuartzAutowiredLifecycleStrategy.onContextInitializing(CamelQuartzRecorder.java:93)
at org.apache.camel.impl.engine.AbstractCamelContext.doInit(AbstractCamelContext.java:2559)
at org.apache.camel.quarkus.core.FastCamelContext.doInit(FastCamelContext.java:195)
at org.apache.camel.support.service.BaseService.init(BaseService.java:85)
at org.apache.camel.impl.engine.AbstractCamelContext.init(AbstractCamelContext.java:2258)
at org.apache.camel.support.service.BaseService.start(BaseService.java:115)
at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2277)
at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:211)
at org.apache.camel.quarkus.main.CamelMain.doStart(CamelMain.java:72)
at org.apache.camel.support.service.BaseService.start(BaseService.java:123)
at org.apache.camel.quarkus.main.CamelMain.startEngine(CamelMain.java:129)
at org.apache.camel.quarkus.main.CamelMainRuntime.start(CamelMainRuntime.java:49)
... 14 more
The bug is not fixed in the latest version 3.31.3 either.
Expected behavior
The application starts without UnsatisfiedResolutionException and io.quarkus.quartz.QuartzScheduler is registered at CDI container.
How to Reproduce?
Execute the minimal test project quartz-bug-test.zip with ./mvnw quarkus:dev. At startup the Exception occourse.
Minimal reproduction:
- Dependencies:
quarkus-quartz+camel-quarkus-quartz+camel-quarkus-core - Property:
quarkus.scheduler.use-composite-scheduler=true - No additional code needed — simply starting the application triggers the error.
Output of uname -a or ver
Darwin test.local 25.2.0 Darwin Kernel Version 25.2.0: Tue Nov 18 21:09:56 PST 2025; root:xnu-12377.61.12~1/RELEASE_ARM64_T6041 arm64
Output of java -version
openjdk version "21.0.8" 2025-07-15 LTS OpenJDK Runtime Environment Temurin-21.0.8+9 (build 21.0.8+9-LTS) OpenJDK 64-Bit Server VM Temurin-21.0.8+9 (build 21.0.8+9-LTS, mixed mode, sharing)
Quarkus version or git rev
3.27.2
Build tool (ie. output of mvnw --version or gradlew --version)
Apache Maven 3.9.12 (848fbb4bf2d427b72bdb2471c22fced7ebd9a7a1) Maven home: /Users/test/.m2/wrapper/dists/apache-maven-3.9.12/6068d197 Java version: 21.0.8, vendor: Eclipse Adoptium, runtime: /Users/test/.sdkman/candidates/java/21.0.8-tem Default locale: en_GB, platform encoding: UTF-8 OS name: "mac os x", version: "26.2", arch: "aarch64", family: "mac"
Additional information
No response