flowable/flowable-engine · warning
Exception while autodeploying DMN definitions for resource {
Error message
Exception while autodeploying DMN definitions for resource {}. This exception can be ignored if the root cause indicates a unique constraint violation, which is typically caused by two (or more) servers booting up at the exact same time and deploying the same definitions. What it means
Same family as the parent-folder strategy warning, but logged by SingleResourceAutoDeploymentStrategy, which deploys each DMN resource as its own deployment. When deploymentBuilder.deploy() throws for one specific resource, this warning names that resource and swallows the exception unless throwExceptionOnDeploymentFailure is enabled. Only unique-constraint root causes (concurrent boot race) are considered safe to ignore; other causes mean that resource's DMN definitions were not deployed.
Source
Thrown at modules/flowable-dmn-spring/src/main/java/org/flowable/dmn/spring/autodeployment/SingleResourceAutoDeploymentStrategy.java:72
DmnRepositoryService repositoryService = engine.getDmnRepositoryService();
// Create a separate deployment for each resource using the resource name
for (Resource resource : resources) {
final String resourceName = determineResourceName(resource);
final DmnDeploymentBuilder deploymentBuilder = repositoryService.createDeployment().enableDuplicateFiltering().name(resourceName);
addResource(resource, resourceName, deploymentBuilder);
try {
deploymentBuilder.deploy();
} catch (Exception e) {
if (isThrowExceptionOnDeploymentFailure()) {
throw e;
} else {
LOGGER.warn("Exception while autodeploying DMN definitions for resource {}. "
+ "This exception can be ignored if the root cause indicates a unique constraint violation, "
+ "which is typically caused by two (or more) servers booting up at the exact same time and deploying the same definitions. ", resource, e);
}
}
}
}
}
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Read the attached exception to identify which resource failed and why; ignore only if it is a unique constraint violation.
- Fix or remove the offending .dmn resource identified by the {} placeholder in the message.
- On clusters, serialize autodeployment (external deployment step) or set flowable.dmn.deploy-resources=false.
- Set throwExceptionOnDeploymentFailure=true to make startup fail loudly on real deployment errors.
Example fix
// before classpath: rules/invoice-lookup.dmn // malformed XML, silently skipped // after # validate the file, or disable autodeploy in favor of a controlled deploy step flowable.dmn.deploy-resources=false
Defensive patterns
Strategy: try-catch
Validate before calling
// per-resource pre-check before enabling autodeploy
XMLStreamReader r = XMLInputFactory.newInstance()
.createXMLStreamReader(new FileInputStream(resource.getFile()));
while (r.hasNext()) r.next(); // throws XMLStreamException if malformed
r.close(); Try / catch
try {
deploymentBuilder.deploy();
} catch (org.flowable.common.engine.api.FlowableException e) {
if (!isUniqueConstraintViolation(e)) throw e;
log.warn("Deployment race for {}, ignoring", resourceName, e);
} Prevention
- Identify the failing resource from the {} placeholder and inspect its attached stack trace
- Validate every .dmn file in the resources folder in CI before packaging
- Serialize deployments across cluster nodes (init job / leader election) to avoid unique-constraint races
- Enable throwExceptionOnDeploymentFailure for strict environments
When it happens
Trigger: deployResourcesInternal iterates Spring resources; deploymentBuilder.deploy() throws for a single resource (malformed .dmn XML, unique constraint race between two servers, DB error) while isThrowExceptionOnDeploymentFailure() is false.
Common situations: Clustering: two pods boot at the same instant and both deploy the same single .dmn file; a single broken .dmn file in the resources folder; database temporarily unavailable at startup.
Related errors
- Exception while autodeploying DMN definitions. This exceptio
- Exception while autodeploying DMN definitions. This exceptio
- There are ${count} decision tables with key = '${decisionKey
- No decision table found with id ${decisionTableId}
- Failed to acquire lock {} due to unknown exception
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/58ac6ebdeeeeba82.
Report an issue: GitHub.