flowable/flowable-engine · error · DmnXMLException

e.getMessage() (dynamic message from wrapped exception)

Error message

e.getMessage() (dynamic message from wrapped exception)

What it means

The final catch-all of the validation block wraps any other Exception (SAXException from schema validation, IOException, etc.) into DmnXMLException(e.getMessage(), e). The message is therefore dynamic — it carries the underlying exception's message, e.g. the specific XSD validation error.

Solutions

  1. Read e.getMessage()/cause — it names the exact XSD constraint violated
  2. Validate the file offline against the matching DMN XSD (org/flowable/dmn/xml/...)
  3. Ensure the root element's namespace matches the intended DMN version (1.3/1.2/1.1)
  4. Fix the offending element/attribute indicated by the SAXParseException message

Example fix

// before
<definitions xmlns="http://www.omg.org/spec/DMN/20151101/dmn/Y" ...>  <!-- unknown ns -> 1.1 xsd -->
// after
<definitions xmlns="http://www.omg.org/spec/DMN/20191111/model/dmn/1.2" ...>  <!-- matches DMN 1.2 xsd -->
Defensive patterns

Strategy: validation

Validate before calling

SchemaFactory sf = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
Schema s = sf.newSchema(new StreamSource(getClass().getResourceAsStream("/org/flowable/dmn/xml/DMN13.xsd")));
s.newValidator().validate(new StreamSource(new File("decision.dmn.xml"))); // offline pre-check

Try / catch

try { converter.convertToDmnModel(provider, true, true); } catch (DmnXMLException e) { log.error("DMN schema violation: {}", e.getMessage()); } // message comes from SAXParseException

Prevention

When it happens

Trigger: validateSchema=true and validation throws a non-XMLStream/non-encoding exception: most commonly SAXParseException because the DMN does not conform to its version's XSD (invalid elements, wrong attribute, bad structure).

Common situations: Hand-written DMN XML not matching the DMN 1.1/1.2/1.3 schema; exporting a decision table with modeler bugs; namespace mismatches causing fallback to the DMN 1.1 XSD; missing required child elements like decision tables/hit policies.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


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

Appendix: source

Thrown at modules/flowable-dmn-xml-converter/src/main/java/org/flowable/dmn/xml/converter/DmnXMLConverter.java:253

        }
        
        if (xif.isPropertySupported(XMLConstants.ACCESS_EXTERNAL_SCHEMA)) {
            xif.setProperty(XMLConstants.ACCESS_EXTERNAL_SCHEMA, "");
        }

        if (validateSchema) {
            try (InputStreamReader in = new InputStreamReader(inputStreamProvider.getInputStream(), encoding)) {
                if (!enableSafeDmnXml) {
                    validateModel(inputStreamProvider);
                } else {
                    validateModel(xif.createXMLStreamReader(in));
                }
            } catch (UnsupportedEncodingException e) {
                throw new DmnXMLException("The dmn xml is not properly encoded", e);
            } catch (XMLStreamException e) {
                throw new DmnXMLException("Error while reading the dmn xml file", e);
            } catch (Exception e) {
                throw new DmnXMLException(e.getMessage(), e);
            }
        }
        // The input stream is closed after schema validation
        try (InputStreamReader in = new InputStreamReader(inputStreamProvider.getInputStream(), encoding)) {
            // XML conversion
            return convertToDmnModel(xif.createXMLStreamReader(in));
        } catch (UnsupportedEncodingException e) {
            throw new DmnXMLException("The dmn xml is not properly encoded", e);
        } catch (XMLStreamException e) {
            throw new DmnXMLException("Error while reading the dmn xml file", e);
        } catch (IOException e) {
            throw new DmnXMLException(e.getMessage(), e);
        }
    }

    public DmnDefinition convertToDmnModel(XMLStreamReader xtr) {
        DmnDefinition model = new DmnDefinition();
        DmnElement parentElement = null;

View on GitHub (pinned to d6d39ce1c6)