quarkusio/quarkus · error · IllegalArgumentException

Scheduler implementation not available:

Error message

Scheduler implementation not available: 

What it means

CompositeScheduler.JobDefinition.setExecuteWith validates that the requested scheduler implementation is one of the schedulers backing the composite scheduler. Passing an unknown implementation name fails fast with this IllegalArgumentException.

Source

Thrown at extensions/scheduler/runtime/src/main/java/io/quarkus/scheduler/runtime/CompositeScheduler.java:147

    }

    @Override
    public String implementation() {
        return Scheduled.AUTO;
    }

    public class CompositeJobDefinition extends AbstractJobDefinition<CompositeJobDefinition> {

        public CompositeJobDefinition(String identity) {
            super(identity);
        }

        @Override
        public CompositeJobDefinition setExecuteWith(String implementation) {
            Objects.requireNonNull(implementation);
            if (!Scheduled.AUTO.equals(implementation)) {
                if (schedulers.stream().map(Scheduler::implementation).noneMatch(implementation::equals)) {
                    throw new IllegalArgumentException("Scheduler implementation not available: " + implementation);
                }
            }
            return super.setExecuteWith(implementation);
        }

        @Override
        public Trigger schedule() {
            String impl = implementation;
            if (Scheduled.AUTO.equals(impl)) {
                impl = schedulerContext.autoImplementation();
            }
            for (Scheduler scheduler : schedulers) {
                if (scheduler.implementation().equals(impl)) {
                    return copy(scheduler.newJob(identity)).schedule();
                }
            }
            throw new IllegalStateException("Matching scheduler implementation not found: " + implementation);
        }

View on GitHub (pinned to e1c734241f)

Solutions

  1. Use Scheduler.AUTO to let the composite pick, or one of the actually registered implementation names (e.g. "quartz", "simple")
  2. Add the extension providing the desired scheduler implementation (e.g. quarkus-quartz)
  3. Log/inspect the set of available implementations and fix the string
  4. Remove the setExecuteWith call if you don't need a specific backend

Example fix

// before
Scheduler.CompositeJobDefinition def = scheduler.newJob("id")
    .setExecuteWith("quartz-typo");
// after
def.setExecuteWith(Scheduled.AUTO); // or "quartz" with quarkus-quartz present
Defensive patterns

Strategy: validation

Validate before calling

boolean ok = Scheduled.AUTO.equals(impl)
    || scheduler.implementations().contains(impl);
if (!ok) throw new IllegalArgumentException("Unknown scheduler impl: " + impl);

Try / catch

try { def.setExecuteWith(impl); }
catch (IllegalArgumentException e) { def.setExecuteWith(Scheduled.AUTO); }

Prevention

When it happens

Trigger: Calling jobDefinition.setExecuteWith("some-impl") on a job definition from the composite scheduler where "some-impl" is not registered in that composite (and is not Scheduled.AUTO).

Common situations: Typo in the implementation name; targeting the Quartz implementation without the quarkus-quartz extension on the classpath; copying a name from docs that doesn't match registered implementations.

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/f06585ad3bdef0f6. Report an issue: GitHub.