flowable/flowable-engine · warning

Exception while autodeploying DMN definitions. This exceptio

Error message

Exception while autodeploying DMN definitions. 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

This is a logged warning (not a thrown exception) emitted when the DMN engine's ResourceParentFolderAutoDeploymentStrategy fails to deploy DMN resources during Spring application startup. Flowable deliberately swallows the exception unless 'flowable.dmn.deploy-resources' failure handling is set to throw, because concurrent server bootstraps can race on the same deployment and violate unique DB constraints, which is harmless (the other server's identical deployment wins). If the root cause is anything other than a unique constraint violation, deployment silently failed and definitions are missing.

Source

Thrown at modules/flowable-dmn-spring/src/main/java/org/flowable/dmn/spring/autodeployment/ResourceParentFolderAutoDeploymentStrategy.java:86

        for (final Entry<String, Set<Resource>> group : resourcesMap.entrySet()) {

            final String deploymentName = determineDeploymentName(deploymentNameHint, group.getKey());
            final DmnDeploymentBuilder deploymentBuilder = repositoryService.createDeployment().enableDuplicateFiltering().name(deploymentName);

            for (final Resource resource : group.getValue()) {
                addResource(resource, deploymentBuilder);
            }

            try {

                deploymentBuilder.deploy();

            } catch (Exception e) {
                if (isThrowExceptionOnDeploymentFailure()) {
                    throw e;
                } else {
                    LOGGER.warn("Exception while autodeploying DMN definitions. "
                        + "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. ", e);
                }
            }
        }

    }

    private Map<String, Set<Resource>> createMap(final Resource[] resources) {
        final Map<String, Set<Resource>> resourcesMap = new HashMap<>();

        for (final Resource resource : resources) {
            final String parentFolderName = determineGroupName(resource);
            if (resourcesMap.get(parentFolderName) == null) {
                resourcesMap.put(parentFolderName, new HashSet<>());
            }
            resourcesMap.get(parentFolderName).add(resource);
        }

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Inspect the 'e' stack trace attached to this warning: if it is a unique constraint violation, no action is needed; if it is anything else, fix the root cause (bad DMN XML, DB connectivity).
  2. Ensure only one node performs autodeployment at a time, or pre-deploy DMN resources and disable autodeployment (flowable.dmn.deploy-resources=false).
  3. Set the deployment mode / use deploymentName with 'deployment-mode: default' semantics or enable 'flowable.check-deployment-desc-version'-style checks so identical deployments are deduplicated.
  4. If failures must fail startup, set throwExceptionOnDeploymentFailure=true on the DmnEngineConfiguration so the original exception propagates.

Example fix

// before (application.yml)
flowable:
  dmn:
    deploy-resources: true
// after: pre-deploy and disable autodeploy on multi-node clusters
flowable:
  dmn:
    deploy-resources: false
// or fail fast instead of swallowing:
// dmnEngineConfiguration.setThrowExceptionOnDeploymentFailure(true);
Defensive patterns

Strategy: try-catch

Validate before calling

// verify DB reachable and definitions unique before enabling autodeploy
try (Connection c = dataSource.getConnection()) {
  if (!c.isValid(5)) throw new IllegalStateException("DB unreachable at startup");
}
// and verify .dmn XML well-formedness
XMLInputFactory f = XMLInputFactory.newInstance();
f.createXMLStreamReader(new FileInputStream("rules.dmn")).close();

Try / catch

// wrap engine autodeploy/startup yourself if you must react
try {
  dmnEngineConfiguration.deployResources();
} catch (org.flowable.common.engine.api.FlowableException e) {
  if (!isUniqueConstraintViolation(e)) {
    throw e; // fail startup on real errors; only constraint races are safe
  }
  log.warn("Concurrent autodeploy race, ignoring", e);
}

Prevention

When it happens

Trigger: Calling deploymentBuilder.deploy() inside deployResourcesInternal throws (e.g. XML parse error, DB unique constraint on ACT_DMN_DEPLOYMENT, connection failure) while isThrowExceptionOnDeploymentFailure() is false (the default for Spring autodeployment).

Common situations: Multiple application instances starting simultaneously against a shared database and auto-deploying the same DMN resources; invalid .dmn XML files on the classpath; database connection issues during startup.

Related errors


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