flowable/flowable-engine · warning

Error while moving down in XML document

Error message

Error while moving down in XML document

What it means

This is a warning logged (not a thrown exception) by XMLStreamReaderUtil.moveDown, a helper that advances a StAX XMLStreamReader into the first child of the current element and returns its local name. Any exception while reading the stream (malformed XML, IO problem, invalid cursor state) is caught, logged, and null is returned, so converters silently treat the element as having no children.

Solutions

  1. Validate the XML file is well-formed before conversion (xmllint --noout or an XML parser dry run)
  2. Inspect the logged cause: an XMLStreamException usually pinpoints the line/column of the malformed content
  3. Re-save the file with correct encoding (UTF-8) and re-upload; check for BOM or mixed encodings
  4. Recover the original DMN/BPMN file from source control or re-export it from the modeler
Defensive patterns

Strategy: validation

Validate before calling

// Ensure well-formedness before handing the stream to converters
XMLStreamReader xtr = factory.createXMLStreamReader(in);
while (xtr.hasNext()) { xtr.next(); } // throws XMLStreamException on malformed XML

Try / catch

// moveDown returns null on error; null-check the result
String child = XMLStreamReaderUtil.moveDown(xtr);
if (child == null) {
  throw new IllegalStateException("moveDown failed or no child element; check converter warn log");
}

Prevention

When it happens

Trigger: Calling moveDown when the stream reader is positioned on a malformed region of the DMN XML, the underlying stream throws an XMLStreamException, or the cursor is already at/near the end of the document when a child is expected.

Common situations: Truncated or corrupt DMN/BPMN XML files (incomplete upload); XML with encoding declarations that do not match the actual bytes; elements closed in the wrong order; deploying a file where XML got mangled by an HTTP proxy or editor.

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


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

Appendix: source

Thrown at modules/flowable-dmn-xml-converter/src/main/java/org/flowable/dmn/xml/converter/XMLStreamReaderUtil.java:42

public class XMLStreamReaderUtil {

    protected static final Logger LOGGER = LoggerFactory.getLogger(XMLStreamReaderUtil.class);

    public static String moveDown(XMLStreamReader xtr) {
        try {
            while (xtr.hasNext()) {
                int event = xtr.next();
                switch (event) {
                case XMLStreamConstants.END_DOCUMENT:
                    return null;
                case XMLStreamConstants.START_ELEMENT:
                    return xtr.getLocalName();
                case XMLStreamConstants.END_ELEMENT:
                    return null;
                }
            }
        } catch (Exception e) {
            LOGGER.warn("Error while moving down in XML document", e);
        }
        return null;
    }

    public static boolean moveToEndOfElement(XMLStreamReader xtr, String elementName) {
        try {
            while (xtr.hasNext()) {
                int event = xtr.next();
                switch (event) {
                case XMLStreamConstants.END_DOCUMENT:
                    return false;
                case XMLStreamConstants.END_ELEMENT:
                    if (xtr.getLocalName().equals(elementName)) {
                        return true;
                    }
                    break;
                }
            }

View on GitHub (pinned to d6d39ce1c6)