flowable/flowable-engine · warning
Exception while autodeploying CMMN definitions for resource
Error message
Exception while autodeploying CMMN 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
SingleResourceAutoDeploymentStrategy deploys each CMMN resource as its own deployment; when deploymentBuilder.deploy() throws a RuntimeException and throwExceptionOnDeploymentFailure is false, the exception is logged with the offending resource name and swallowed. This lets clustered startups continue when a unique constraint is hit by another node deploying the same resource.
Source
Thrown at modules/flowable-cmmn-spring/src/main/java/org/flowable/cmmn/spring/autodeployment/SingleResourceAutoDeploymentStrategy.java:72
CmmnRepositoryService repositoryService = engine.getCmmnRepositoryService();
// Create a separate deployment for each resource using the resource name
for (final Resource resource : resources) {
final String resourceName = determineResourceName(resource);
final CmmnDeploymentBuilder deploymentBuilder = repositoryService.createDeployment().enableDuplicateFiltering().name(resourceName);
addResource(resource, resourceName, deploymentBuilder);
try {
deploymentBuilder.deploy();
} catch (RuntimeException e) {
if (isThrowExceptionOnDeploymentFailure()) {
throw e;
} else {
LOGGER.warn("Exception while autodeploying CMMN 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
- Check the log line for the resource name ({}) and its root cause; unique-constraint races are safe to ignore.
- Enable CmmnEngineConfiguration.setThrowExceptionOnDeploymentFailure(true) so failures fail startup instead of being warned.
- Remove or fix the invalid resource if the cause is XML/validation, since it is silently skipped otherwise.
- Add a startup lock or designate a single deployer node to avoid multi-node simultaneous auto-deploy.
- Verify each case definition appears in the repository after boot to confirm nothing was lost.
Example fix
// before cmmnEngineConfiguration.setThrowExceptionOnDeploymentFailure(false); // after cmmnEngineConfiguration.setThrowExceptionOnDeploymentFailure(true); // treat per-resource deploy failure as fatal
Defensive patterns
Strategy: retry
Validate before calling
for (String res : resources) {
// validate resource parses before deploy
try (InputStream is = new FileInputStream(res)) {
DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(is); // throws early on malformed XML
}
} Try / catch
try {
deployResources(resources);
} catch (RuntimeException e) {
if (e.getCause() instanceof SQLIntegrityConstraintViolationException
|| String.valueOf(e).contains("ACT_CMMN_DEPLOYMENT")) {
LOGGER.info("Benign concurrent deployment for resource; skipping");
} else throw e;
} Prevention
- Set throwExceptionOnDeploymentFailure=true to surface bad resources at startup.
- Verify post-boot that each expected case definition is registered (createCaseDefinitionQuery).
- Fix or remove corrupt .cmmn resources; per-resource mode silently skips failures otherwise.
- Coordinate multi-node boots (stagger or single deployer) to avoid unique-constraint races.
When it happens
Trigger: Per-resource Spring auto-deployment of a .cmmn/.dmn-style resource failing in deploy(): unique constraint race between simultaneous server boots, or an invalid/unreadable resource being deployed.
Common situations: Multiple app instances sharing one Flowable DB booting in the same instant; one corrupt .cmmn file among many silently skipped; deployments racing with a concurrent redeploy of identical content.
Related errors
- Exception while autodeploying CMMN definitions. This excepti
- Exception while autodeploying CMMN definitions. This excepti
- Exception while autodeploying DMN definitions. This exceptio
- Task '
- Can only enable a plan item instance which is in state ENABL
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/55e47d4440def842.
Report an issue: GitHub.