{"record":{"id":"a29c5ebaf780afb2","repo":"flowable/flowable-engine","slug":"exception-while-autodeploying-dmn-definitions-thi","errorCode":null,"errorMessage":"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. ","messagePattern":"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\\. ","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"modules/flowable-dmn-spring/src/main/java/org/flowable/dmn/spring/autodeployment/DefaultAutoDeploymentStrategy.java","lineNumber":71,"sourceCode":"    @Override\n    protected void deployResourcesInternal(String deploymentNameHint, Resource[] resources, DmnEngine engine) {\n        DmnRepositoryService repositoryService = engine.getDmnRepositoryService();\n\n        // Create a single deployment for all resources using the name hint as the literal name\n        final DmnDeploymentBuilder deploymentBuilder = repositoryService.createDeployment().enableDuplicateFiltering().name(deploymentNameHint);\n\n        for (final Resource resource : resources) {\n            addResource(resource, deploymentBuilder);\n        }\n        try {\n\n            deploymentBuilder.deploy();\n\n        } catch (Exception e) {\n            if (isThrowExceptionOnDeploymentFailure()) {\n                throw e;\n            } else {\n                LOGGER.warn(\"Exception while autodeploying DMN definitions. \"\n                    + \"This exception can be ignored if the root cause indicates a unique constraint violation, \"\n                    + \"which is typically caused by two (or more) servers booting up at the exact same time and deploying the same definitions. \", e);\n            }\n        }\n\n    }\n\n}\n","sourceCodeStart":53,"sourceCodeEnd":80,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-spring/src/main/java/org/flowable/dmn/spring/autodeployment/DefaultAutoDeploymentStrategy.java#L53-L80","documentation":"A WARN from DefaultAutoDeploymentStrategy.deployResourcesInternal: the DMN auto-deployment on application startup threw an exception. When throwExceptionOnDeploymentFailure is false, the exception is swallowed with this message because it is often a unique-constraint violation caused by several server instances deploying identical definitions simultaneously — which is safe to ignore.","triggerScenarios":"Spring Boot startup with flowable.dmn auto-deployment enabled (classpath .dmn resources) while another node deploys the same definitions at the same moment, or a genuinely failing deployment (bad XML) with auto-deployment failure tolerated.","commonSituations":"Clustering several booting instances against a shared database; Kubernetes rolling restarts; misconfigured DMN files where the warning masks a real deployment failure.","solutions":["Read the nested root cause: if it is a unique constraint (ACT_DMN_DEPLOYMENT / geometric UNIQUE), it is safe to ignore.","If the root cause is a parse/validation error, fix the .dmn resource — the swallowed warning hides real failures.","Set the deployment-failure flag (throwExceptionOnDeploymentFailure) to true during development to fail fast on bad DMN files.","Stagger instance startup or use deployment name/version locking to reduce concurrent-deploy races."],"exampleFix":"// before (application.yml)\nflowable:\n  dmn:\n    check-definition: false\n// after (fail fast during dev)\nflowable:\n  dmn:\n    enabled: true\n# ensure DMN XML validates locally before deploy:\n# mvn test -Dtest=DmnDeploymentValidationTest","handlingStrategy":"try-catch","validationCode":"// validate DMN resources before startup\nDmnParser.parseAll(new ClassPathResource(\"dmn/decision.dmn\").getInputStream()); // throws on invalid XML","typeGuard":null,"tryCatchPattern":"try { dmnEngineRule.deploy(...); } catch (org.flowable.common.engine.api.FlowableException e) { if (!isUniqueConstraint(e)) throw e; /* tolerate race */ }","preventionTips":["Inspect the nested root cause before ignoring","Enable throwExceptionOnDeploymentFailure in dev","Stagger multi-node startups to avoid unique-constraint races","Validate .dmn files in CI before shipping"],"tags":["dmn","spring","auto-deployment","concurrency","database"],"backgroundTag":"conflicting-config-options","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}