quarkusio/quarkus · error · IllegalArgumentException
Description for job '{identity}' is too long: {length} chara
Error message
Description for job '{identity}' is too long: {length} characters (max 250) What it means
Quarkus validates that a job's description does not exceed Scheduled.DESCRIPTION_MAX_LENGTH (250 characters) and throws this IllegalArgumentException from validateDescriptionLength when it does. The validation runs when creating job definitions/triggers (both static @Scheduled descriptions and programmatic newJob().setDescription()), keeping Quartz metadata within limits imposed by the Scheduler API contract.
Source
Thrown at extensions/quartz/runtime/src/main/java/io/quarkus/quartz/runtime/QuartzSchedulerImpl.java:677
}
private void putExtensionConfigurationProperties(Properties props, String prefix,
Map<String, QuartzExtensionPointConfig> configs) {
configs.forEach((configKey, config) -> {
putExtensionConfigurationProperties(props, String.format("%s.%s", prefix, configKey), config);
});
}
private void putExtensionConfigurationProperties(Properties props, String prefix, QuartzExtensionPointConfig config) {
props.put(String.format("%s.class", prefix), config.clazz());
config.properties().forEach((propName, propValue) -> {
props.put(String.format("%s.%s", prefix, propName), propValue);
});
}
private static void validateDescriptionLength(String identity, String description) {
if (description != null && description.length() > Scheduled.DESCRIPTION_MAX_LENGTH) {
throw new IllegalArgumentException(
"Description for job '" + identity + "' is too long: " + description.length()
+ " characters (max " + Scheduled.DESCRIPTION_MAX_LENGTH + ")");
}
}
private JobBuilder createJobBuilder(String identity, String invokerClassName, boolean noncurrent, String description) {
Class<? extends Job> jobClass = noncurrent ? NonconcurrentInvokerJob.class
: InvokerJob.class;
JobBuilder jobBuilder = JobBuilder.newJob(jobClass)
// new JobKey(identity, "io.quarkus.scheduler.Scheduler")
.withIdentity(identity, Scheduler.class.getName())
// this info is redundant but keep it for backward compatibility
.usingJobData(INVOKER_KEY, invokerClassName)
.requestRecovery();
if (description != null) {
jobBuilder.withDescription(description);
}
return jobBuilder;View on GitHub (pinned to e1c734241f)
Solutions
- Shorten the description to 250 characters or fewer
- Truncate programmatically before setting: description.length() > 250 ? description.substring(0, 250) : description
- Move long documentation into a doc comment or external docs; keep the description as a short summary
- Add a startup/config validation for description sources (config properties, DB) that feed descriptions
Example fix
// before
jobDef.setDescription(longMarkdownDocs); // IllegalArgumentException
// after
String desc = longMarkdownDocs;
if (desc != null && desc.length() > 250) {
desc = desc.substring(0, 250);
}
jobDef.setDescription(desc); Defensive patterns
Strategy: validation
Validate before calling
static String safeDescription(String d) {
return (d == null || d.length() <= 250) ? d : d.substring(0, 250);
} Type guard
boolean isValidDescription(String d) {
return d == null || d.length() <= 250;
} Try / catch
try {
jobDef.setDescription(description);
} catch (IllegalArgumentException e) {
jobDef.setDescription(description.substring(0, 250));
} Prevention
- Enforce a 250-char limit at the config/source layer feeding descriptions
- Truncate before calling setDescription()
- Keep job descriptions as short summaries, not documentation
When it happens
Trigger: Declaring a @Scheduled job with a description longer than 250 characters, or calling QuartzJobDefinition.setDescription(...) with a string over 250 characters during programmatic job creation.
Common situations: Using a full documentation paragraph as the job description; loading descriptions from config or i18n bundles without length checks; descriptions copied from Javadoc.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- Global cron trigger misfire policy configured with invalid o
- Global simple trigger misfire policy configured with invalid
- Quartz scheduler is either explicitly disabled through quark
- Unable to pause scheduler
- Unable to pause job
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/63f7ae950eedd3bb.
Report an issue: GitHub.