flowable/flowable-engine · warning

Using Joda-Time LocalDate has been deprecated and will be…

Error message

Using Joda-Time LocalDate has been deprecated and will be removed in a future version. Task Variable {} in task {} was a Joda-Time LocalDate. 

What it means

A deprecation warning logged by JodaDateType.setValue when a variable attached to a task holds a Joda-Time LocalDate. Flowable persists it as start-of-day millis and warns Joda-Time support will be removed. Execution continues normally.

Solutions

  1. Convert the value to java.time.LocalDate (java.time API is supported natively)
  2. Replace org.joda.time.LocalDate usage in the calling code
  3. Suppress/ignore the warning only as a short-term measure while migrating

Example fix

// before
Map<String, Object> vars = new HashMap<>();
vars.put("startDate", org.joda.time.LocalDate.now());
taskService.setVariablesLocal(taskId, vars);
// after
vars.put("startDate", java.time.LocalDate.now());
Defensive patterns

Strategy: validation

Validate before calling

if (value instanceof org.joda.time.LocalDate) { value = java.time.LocalDate.parse(value.toString()); }

Type guard

boolean isJodaLocalDate(Object v) { return v instanceof org.joda.time.LocalDate; }

Prevention

When it happens

Trigger: taskService.setVariable(...) or execution.setVariable on a variable whose value is an org.joda.time.LocalDate and whose ValueFields has a taskId set.

Common situations: Pre-java.time code storing LocalDate variables on user tasks; migrated Activiti 5 processes using Joda types.

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


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/d3219aceaa55a84a. Report an issue: GitHub.

Appendix: source

Thrown at modules/flowable-variable-service/src/main/java/org/flowable/variable/service/impl/types/JodaDateType.java:58

            return true;
        }
        return LocalDate.class.isAssignableFrom(value.getClass());
    }

    @Override
    public Object getValue(ValueFields valueFields) {
        Long longValue = valueFields.getLongValue();
        if (longValue != null) {
            return new LocalDate(longValue);
        }
        return null;
    }

    @Override
    public void setValue(Object value, ValueFields valueFields) {
        if (value != null) {
            if (valueFields.getTaskId() != null) {
                JodaDeprecationLogger.LOGGER.warn(
                        "Using Joda-Time LocalDate has been deprecated and will be removed in a future version. Task Variable {} in task {} was a Joda-Time LocalDate. ",
                        valueFields.getName(), valueFields.getTaskId());
            } else if (valueFields.getProcessInstanceId() != null) {
                JodaDeprecationLogger.LOGGER.warn(
                        "Using Joda-Time LocalDate has been deprecated and will be removed in a future version. Process Variable {} in process instance {} and execution {} was a Joda-Time LocalDate. ",
                        valueFields.getName(), valueFields.getProcessInstanceId(), valueFields.getExecutionId());
            } else {
                JodaDeprecationLogger.LOGGER.warn(
                        "Using Joda-Time LocalDate has been deprecated and will be removed in a future version. Variable {} in {} instance {} and sub-scope {} was a Joda-Time LocalDate. ",
                        valueFields.getName(), valueFields.getScopeType(), valueFields.getScopeId(), valueFields.getSubScopeId());
            }
            valueFields.setLongValue(((LocalDate) value).toDateTimeAtStartOfDay().getMillis());
        } else {
            valueFields.setLongValue(null);
        }
    }
}

View on GitHub (pinned to d6d39ce1c6)