flowable/flowable-engine · error · java.lang.IllegalArgumentException
businessCalendars can not be null
Error message
businessCalendars can not be null
What it means
Constructor validation in MapBusinessCalendarManager: the business calendar map passed in is null. The manager requires a (possibly empty) map to look up due-date calculators, and a null map would cause NPEs later during timer/job evaluation.
Solutions
- Pass a non-null (possibly empty) map of business calendars
- Use the no-arg constructor and register calendars afterwards
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/calendar/MapBusinessCalendarManager.java:33 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/2f11e1e55e44d0fb.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/calendar/MapBusinessCalendarManager.java:33
import java.util.HashMap;
import java.util.Map;
import org.flowable.common.engine.api.FlowableException;
/**
* @author Tom Baeyens
*/
public class MapBusinessCalendarManager implements BusinessCalendarManager {
private final Map<String, BusinessCalendar> businessCalendars;
public MapBusinessCalendarManager() {
this.businessCalendars = new HashMap<>();
}
public MapBusinessCalendarManager(Map<String, BusinessCalendar> businessCalendars) {
if (businessCalendars == null) {
throw new IllegalArgumentException("businessCalendars can not be null");
}
this.businessCalendars = new HashMap<>(businessCalendars);
}
@Override
public BusinessCalendar getBusinessCalendar(String businessCalendarRef) {
BusinessCalendar businessCalendar = businessCalendars.get(businessCalendarRef);
if (businessCalendar == null) {
throw new FlowableException("Requested business calendar " + businessCalendarRef +
" does not exist. Allowed calendars are " + this.businessCalendars.keySet() + ".");
}
return businessCalendar;
}
public BusinessCalendarManager addBusinessCalendar(String businessCalendarRef, BusinessCalendar businessCalendar) {
businessCalendars.put(businessCalendarRef, businessCalendar);
return this;View on GitHub (pinned to d6d39ce1c6)