flowable/flowable-engine · error · XMLException
e.getMessage()
Error message
e.getMessage()
What it means
In the same convertToBpmnModel(InputStreamProvider, String) catch-all, any non-XMLStreamException Exception during the first parse pass is rethrown as XMLException whose message is the original e.getMessage(). It is a generic wrapper so all parse failures surface as Flowable XMLException.
Source
Thrown at modules/flowable-bpmn-converter/src/main/java/org/flowable/bpmn/converter/BpmnXMLConverter.java:303
}
if (xif.isPropertySupported(XMLConstants.ACCESS_EXTERNAL_SCHEMA)) {
xif.setProperty(XMLConstants.ACCESS_EXTERNAL_SCHEMA, "");
}
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 XMLException("The bpmn 2.0 xml is not properly encoded", e);
} catch(XMLStreamException e){
throw new XMLException("Error while reading the BPMN 2.0 XML", e);
} catch(Exception e){
throw new XMLException(e.getMessage(), e);
}
}
// The input stream is closed after schema validation
try (InputStreamReader in = new InputStreamReader(inputStreamProvider.getInputStream(), encoding)) {
// XML conversion
return convertToBpmnModel(xif.createXMLStreamReader(in));
} catch (UnsupportedEncodingException e) {
throw new XMLException("The bpmn 2.0 xml is not properly encoded", e);
} catch (XMLStreamException e) {
throw new XMLException("Error while reading the BPMN 2.0 XML", e);
} catch (IOException e) {
throw new XMLException(e.getMessage(), e);
}
}
public BpmnModel convertToBpmnModel(XMLStreamReader xtr) {
BpmnModel model = new BpmnModel();
model.setStartEventFormTypes(startEventFormTypes);View on GitHub (pinned to d6d39ce1c6)
Solutions
- Inspect the cause chain (e.getCause()) — the real error text is in the wrapped exception.
- Fix the underlying problem reported by the cause (invalid model element, NPE in a custom converter, etc.).
- Re-run the model through the Flowable modeler or validateModel to catch issues before deploy.
- Upgrade flowable-bpmn-converter if the cause indicates a known converter bug.
Example fix
// before
catch (XMLException e) { log.error(e.getMessage()); } // message may be empty/obscure
// after
catch (XMLException e) {
Throwable cause = e.getCause();
log.error("BPMN parse failed: {}", cause != null ? cause.getMessage() : e.getMessage(), cause);
} Defensive patterns
Strategy: try-catch
Try / catch
try {
converter.convertToBpmnModel(provider, encoding);
} catch (XMLException e) {
// message is e.getMessage() of the wrapped cause — always log the cause chain
log.error("BPMN first-pass parse failed", e);
Throwable root = e;
while (root.getCause() != null) root = root.getCause();
throw new DeploymentException("Root cause: " + root.getMessage(), e);
} Prevention
- Always inspect and log the full cause chain, not just the wrapper message
- Test BPMN files through convertToBpmnModel in CI before production deploy
- Pin converter and modeler versions together
When it happens
Trigger: Any RuntimeException (e.g. NullPointerException, IllegalArgumentException from a converter, SAX validation error wrapped differently) thrown while validateModel or createXMLStreamReader processes the first-pass stream in convertToBpmnModel(InputStreamProvider, String).
Common situations: XSD validation failing in validateModel with a differently-wrapped exception, custom converter extensions throwing, or JDK/stax implementation quirks when reading the deployed BPMN file.
Understand the failure class
Background: JSON parse error: "Unexpected token" / "not valid JSON" / "failed to parse" — what JSON parsers are really complaining about — this error's family across 45 libraries.
Related errors
- The bpmn 2.0 xml is not properly encoded
- Error while reading the BPMN 2.0 XML
- Error reading XML
- Error writing BPMN XML
- BPMN XSD could not be found
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/96fd2abdb109d237.
Report an issue: GitHub.