flowable/flowable-engine · error · CmmnXMLException

e.getMessage()

Error message

e.getMessage()

What it means

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.

Source

Thrown at modules/flowable-cmmn-converter/src/main/java/org/flowable/cmmn/converter/CmmnXmlConverter.java:191

        }

        if (encoding == null) {
            encoding = DEFAULT_ENCODING;
        }

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

    public CmmnModel convertToCmmnModel(XMLStreamReader xtr) {

        ConversionHelper conversionHelper = new ConversionHelper();

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Inspect the cause chain (getCause()) for the real failure since the message may be null or unhelpful
  2. Validate the XML against the CMMN 1.1 XSD externally to isolate the issue
  3. Try with enableSafeBpmnXml toggled to change the reader path
  4. Upgrade/patch Flowable if the cause points into the validator itself

Example fix

// before
try { converter.convertToCmmnModel(provider); } catch (CmmnXMLException e) { log.error(e.getMessage()); }
// after
try { converter.convertToCmmnModel(provider); } catch (CmmnXMLException e) {
    log.error("CMMN conversion failed", e); // log full cause chain, message may be null
}
Defensive patterns

Strategy: try-catch

Validate before calling

// pre-validate externally against the CMMN 1.1 XSD
Process p = new ProcessBuilder("xmllint", "--noout", "--schema", "CMMN10.xsd", caseFile.toString()).start();
if (p.waitFor() != 0) throw new IllegalArgumentException("CMMN XSD validation failed: " + caseFile);

Try / catch

try { model = converter.convertToCmmnModel(provider); } catch (CmmnXMLException e) {
    Throwable root = e; while (root.getCause() != null) root = root.getCause();
    throw new DeploymentException("CMMN validation failed: " + root.getMessage(), root);
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

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/eb0a30aacabce619. Report an issue: GitHub.