flowable/flowable-engine · warning
Using Joda-Time DateTime has been deprecated and will be…
Error message
Using Joda-Time DateTime has been deprecated and will be removed in a future version. Variable {} in {} instance {} and sub-scope {} was a Joda-Time DateTime. What it means
A deprecation warning logged by JodaDateTimeType.setValue when a process/task/scope variable holds a Joda-Time DateTime. Flowable stores it as millis and warns that Joda-Time support will be removed in a future version. It is not thrown, only logged; the variable is still persisted.
Solutions
- Migrate the variable value to java.time.Instant or java.util.Date before setting it
- Replace org.joda.time.DateTime with java.time.Instant/OffsetDateTime in the code that creates the value
- If Joda must stay temporarily, accept the warning and plan removal before the next Flowable major upgrade
Example fix
// before
execution.setVariable("dueDate", org.joda.time.DateTime.now());
// after
execution.setVariable("dueDate", java.time.Instant.now()); Defensive patterns
Strategy: validation
Validate before calling
if (value instanceof org.joda.time.DateTime) { throw new IllegalArgumentException("use java.time instead of Joda DateTime for variable " + name); } Type guard
boolean isJodaDateTime(Object v) { return v instanceof org.joda.time.DateTime; } Prevention
- Ban org.joda.time types in new code via Checkstyle/ArchUnit rules
- Convert Joda values to java.time at system boundaries
- Audit variable-setting code for legacy date types
When it happens
Trigger: Setting a variable to an org.joda.time.DateTime via e.g. execution.setVariable("x", dateTime) or a JodaDateTimeType instance when the variable has no taskId but a sub-scope (scopeType/scopeId/subScopeId logged).
Common situations: Legacy Activiti 5/6 codebases upgraded to Flowable that still use Joda-Time types; date-handling utilities written pre-java.time migration.
Understand the failure class
Background: "is deprecated and will be removed" — deprecation warnings for old API names, keywords, and options, and how to migrate before the removal release — this error's family across 29 libraries.
Related errors
- Using Joda-Time DateTime has been deprecated and will be…
- Using Joda-Time DateTime has been deprecated and will be…
- Using Joda-Time LocalDate has been deprecated and will be…
- Using Joda-Time LocalDate has been deprecated and will be…
- Using Joda-Time LocalDate has been deprecated and will be…
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/7346d68230a30e04.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-variable-service/src/main/java/org/flowable/variable/service/impl/types/JodaDateTimeType.java:66
if (longValue != null) {
return new DateTime(longValue);
}
return null;
}
@Override
public void setValue(Object value, ValueFields valueFields) {
if (value != null) {
if (valueFields.getTaskId() != null) {
JodaDeprecationLogger.LOGGER.warn(
"Using Joda-Time DateTime has been deprecated and will be removed in a future version. Task Variable {} in task {} was a Joda-Time DateTime. ",
valueFields.getName(), valueFields.getTaskId());
} else if (valueFields.getProcessInstanceId() != null) {
JodaDeprecationLogger.LOGGER.warn(
"Using Joda-Time DateTime has been deprecated and will be removed in a future version. Process Variable {} in process instance {} and execution {} was a Joda-Time DateTime. ",
valueFields.getName(), valueFields.getProcessInstanceId(), valueFields.getExecutionId());
} else {
JodaDeprecationLogger.LOGGER.warn(
"Using Joda-Time DateTime has been deprecated and will be removed in a future version. Variable {} in {} instance {} and sub-scope {} was a Joda-Time DateTime. ",
valueFields.getName(), valueFields.getScopeType(), valueFields.getScopeId(), valueFields.getSubScopeId());
}
valueFields.setLongValue(((DateTime) value).getMillis());
} else {
valueFields.setLongValue(null);
}
}
}
View on GitHub (pinned to d6d39ce1c6)