{"record":{"id":"eb0a30aacabce619","repo":"flowable/flowable-engine","slug":"e-getmessage-eb0a30","errorCode":null,"errorMessage":"e.getMessage()","messagePattern":"e\\.getMessage\\(\\)","errorType":"exception","errorClass":"CmmnXMLException","httpStatus":null,"severity":"error","filePath":"modules/flowable-cmmn-converter/src/main/java/org/flowable/cmmn/converter/CmmnXmlConverter.java","lineNumber":191,"sourceCode":"        }\n\n        if (encoding == null) {\n            encoding = DEFAULT_ENCODING;\n        }\n\n        if (validateSchema) {\n            try (InputStreamReader in = new InputStreamReader(inputStreamProvider.getInputStream(), encoding)) {\n                if (!enableSafeBpmnXml) {\n                    validateModel(inputStreamProvider);\n                } else {\n                    validateModel(new FlowableXMLStreamReader(xif.createXMLStreamReader(in)));\n                }\n            } catch (UnsupportedEncodingException e) {\n                throw new CmmnXMLException(\"The CMMN 1.1 xml is not properly encoded\", e);\n            } catch (XMLStreamException e) {\n                throw new CmmnXMLException(\"Error while reading the CMMN 1.1 XML\", e);\n            } catch (Exception e) {\n                throw new CmmnXMLException(e.getMessage(), e);\n            }\n        }\n        // The input stream is closed after schema validation\n        try (InputStreamReader in = new InputStreamReader(inputStreamProvider.getInputStream(), encoding)) {\n            // XML conversion\n            return convertToCmmnModel(xif.createXMLStreamReader(in));\n        } catch (UnsupportedEncodingException e) {\n            throw new CmmnXMLException(\"The CMMN 1.1 xml is not properly encoded\", e);\n        } catch (XMLStreamException e) {\n            throw new CmmnXMLException(\"Error while reading the CMMN 1.1 XML\", e);\n        } catch (IOException e) {\n            throw new CmmnXMLException(e.getMessage(), e);\n        }\n    }\n\n    public CmmnModel convertToCmmnModel(XMLStreamReader xtr) {\n\n        ConversionHelper conversionHelper = new ConversionHelper();","sourceCodeStart":173,"sourceCodeEnd":209,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-converter/src/main/java/org/flowable/cmmn/converter/CmmnXmlConverter.java#L173-L209","documentation":"The catch-all in CmmnXmlConverter.convertToCmmnModel wraps any other exception during schema validation into CmmnXMLException whose message is the original exception's getMessage() (possibly null). It signals an unexpected failure during validation of the CMMN 1.1 XML.","triggerScenarios":"convertToCmmnModel hits any Exception (not UnsupportedEncodingException/XMLStreamException) while validating — e.g. runtime errors thrown by the XSD validator or FlowableXMLStreamReader wrapper — typically from malformed model data tripping validator code.","commonSituations":"Bugs or incompatibilities in the validation stack; exotic XML features (external entities, huge files) blowing up the validator; exceptions with null messages making the error hard to trace.","solutions":["Inspect the cause chain (getCause()) for the real failure since the message may be null or unhelpful","Validate the XML against the CMMN 1.1 XSD externally to isolate the issue","Try with enableSafeBpmnXml toggled to change the reader path","Upgrade/patch Flowable if the cause points into the validator itself"],"exampleFix":"// before\ntry { converter.convertToCmmnModel(provider); } catch (CmmnXMLException e) { log.error(e.getMessage()); }\n// after\ntry { converter.convertToCmmnModel(provider); } catch (CmmnXMLException e) {\n    log.error(\"CMMN conversion failed\", e); // log full cause chain, message may be null\n}","handlingStrategy":"try-catch","validationCode":"// pre-validate externally against the CMMN 1.1 XSD\nProcess p = new ProcessBuilder(\"xmllint\", \"--noout\", \"--schema\", \"CMMN10.xsd\", caseFile.toString()).start();\nif (p.waitFor() != 0) throw new IllegalArgumentException(\"CMMN XSD validation failed: \" + caseFile);","typeGuard":null,"tryCatchPattern":"try { model = converter.convertToCmmnModel(provider); } catch (CmmnXMLException e) {\n    Throwable root = e; while (root.getCause() != null) root = root.getCause();\n    throw new DeploymentException(\"CMMN validation failed: \" + root.getMessage(), root);\n}","preventionTips":["Log the full cause chain — the top-level message (e.getMessage()) may be null","Pre-validate with an external XSD validator to get precise diagnostics","Keep large/exotic XML features (external entities, huge files) out of CMMN resources","Pin a known-good Flowable version if the cause points into the validator"],"tags":["cmmn","xml","xsd-validation","conversion"],"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-14T05:17:10.506Z"}