{"record":{"id":"95082b7e66a56c75","repo":"flowable/flowable-engine","slug":"error-parsing-xml-95082b","errorCode":null,"errorMessage":"Error parsing XML","messagePattern":"Error parsing XML","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/parser/DmnParse.java","lineNumber":119,"sourceCode":"                    for (Decision decision : dmnDefinition.getDecisions()) {\n                        DecisionEntity decisionEntity = CommandContextUtil.getDmnEngineConfiguration().getDecisionDataManager().create();\n                        decisionEntity.setKey(decision.getId());\n                        decisionEntity.setName(decision.getName());\n                        decisionEntity.setResourceName(name);\n                        decisionEntity.setDeploymentId(deployment.getId());\n                        decisionEntity.setDescription(decision.getDescription());\n                        decisionEntity.setDecisionType(DecisionTypes.DECISION_TABLE);\n                        decisions.add(decisionEntity);\n                    }\n                }\n            }\n        } catch (Exception e) {\n            if (e instanceof FlowableException) {\n                throw (FlowableException) e;\n            } else if (e instanceof DmnXMLException) {\n                throw (DmnXMLException) e;\n            } else {\n                throw new FlowableException(\"Error parsing XML\", e);\n            }\n        }\n\n        return this;\n    }\n\n    public DmnParse name(String name) {\n        this.name = name;\n        return this;\n    }\n\n    public DmnParse sourceInputStream(InputStream inputStream) {\n        if (name == null) {\n            name(\"inputStream\");\n        }\n        setStreamSource(new InputStreamSource(inputStream));\n        return this;\n    }","sourceCodeStart":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/parser/DmnParse.java#L101-L137","documentation":"DmnParse.execute parses a DMN XML document into the engine's model; any exception raised that is neither FlowableException nor DmnXMLException is wrapped as FlowableException('Error parsing XML', e). It signals that the DMN XML content could not be parsed into a valid model.","triggerScenarios":"Calling DmnParse.execute (typically via createDmnParseFromResource) with malformed or non-DMN XML, an unreadable input stream, or a parser configuration failure.","commonSituations":"Corrupt or truncated .dmn file; file is valid XML but wrong schema/namespace (e.g. non-DMN XML deployed as DMN); XML features/doctype handling differences after upgrading the XML parser/JDK; encoding mismatch causing parse errors.","solutions":["Open the wrapped cause (e.getCause()) to see the underlying XML parser error and line number","Validate the .dmn file against the DMN 1.1 XSD before deploying","Confirm the file is actually a DMN XML document with the correct namespace","Re-export/repair the file from the DMN modeling tool and redeploy"],"exampleFix":"// before\ncatch (Exception e) { /* 'Error parsing XML' with hidden cause */ }\n// after (debug approach)\ntry { parse.execute(); } catch (FlowableException e) { e.printStackTrace(); /* inspect cause */ }","handlingStrategy":"try-catch","validationCode":"// validate XML before handing to the parser\nDocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new File(path)); // throws SAXParseException on malformed XML","typeGuard":null,"tryCatchPattern":"try { parse.execute(); } catch (FlowableException e) { Throwable cause = e.getCause(); /* inspect cause for exact XML location */ }","preventionTips":["Validate .dmn files against the DMN XSD before deployment","Confirm correct DMN namespace in the XML root element","Re-export files from the modeling tool after edits"],"tags":["xml","parse-error","dmn","validation"],"backgroundTag":"schema-validation-failed","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}