{"record":{"id":"8febb077fd5a1cc2","repo":"flowable/flowable-engine","slug":"error-while-reading-attribute-element-name-exten","errorCode":null,"errorMessage":"Error while reading {ATTRIBUTE_ELEMENT_NAME} extension element","messagePattern":"Error while reading (.+?) extension element","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-cmmn-converter/src/main/java/org/flowable/cmmn/converter/ExtensionElementsXMLConverter.java","lineNumber":492,"sourceCode":"            } catch (Exception e) {\n                LOGGER.warn(\"Error parsing collection child elements\", e);\n            }\n        }\n\n    }\n\n    protected void readElementName(XMLStreamReader xtr, ConversionHelper conversionHelper) {\n        CmmnElement currentCmmnElement = conversionHelper.getCurrentCmmnElement();\n\n        if (currentCmmnElement instanceof CaseElement) {\n            try {\n                String elementName = xtr.getElementText();\n\n                if (StringUtils.isNotEmpty(elementName)) {\n                    ((CaseElement) currentCmmnElement).setName(elementName.trim());\n                }\n            } catch (Exception e) {\n                throw new FlowableException(\"Error while reading \" + ATTRIBUTE_ELEMENT_NAME + \" extension element\", e);\n            }\n\n        }\n\n    }\n\n    protected void readCommonXmlInfo(BaseElement baseElement, XMLStreamReader xtr) {\n        baseElement.setId(xtr.getAttributeValue(null, CmmnXmlConstants.ATTRIBUTE_ID));\n        Location location = xtr.getLocation();\n        baseElement.setXmlRowNumber(location.getLineNumber());\n        baseElement.setXmlRowNumber(location.getColumnNumber());\n    }\n\n}\n","sourceCodeStart":474,"sourceCodeEnd":507,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-converter/src/main/java/org/flowable/cmmn/converter/ExtensionElementsXMLConverter.java#L474-L507","documentation":"Flowable wraps any failure while reading the text content of a <extensionElements> child's element name (the 'elementName' attribute element) into this FlowableException. It is a low-level XML parsing wrapper: the original cause (usually an XMLStreamException from the underlying StAX reader) is attached as the cause. It means the CMMN XML is malformed at that position or the stream is in an unexpected state.","triggerScenarios":"Converting a CMMN model whose extension element (element identified by ATTRIBUTE_ELEMENT_NAME) has malformed or unreadable text content; the StAX reader throws XMLStreamException on xtr.getElementText(); also thrown when the current CMMN element cannot accept the name.","commonSituations":"Hand-edited or tool-generated CMMN XML with a truncated/empty extension element; wrong namespace declarations; corrupted XML files; incompatible converter version vs XML features.","solutions":["Validate the CMMN XML with an XML schema/validator and fix malformed extension elements near the reported location.","Check the exception cause (e.getCause()) to identify the exact XMLStreamException and offset.","Ensure extension elements use the correct Flowable extension namespace (e.g. http://flowable.org/cmmn).","Re-export the model from the original modeling tool instead of hand-editing the XML."],"exampleFix":"// before\n<extensionElements>\n  <flowable:name\n</extensionElements>\n// after\n<extensionElements>\n  <flowable:name>myName</flowable:name>\n</extensionElements>","handlingStrategy":"try-catch","validationCode":"// Validate XML before conversion\njavax.xml.XMLConstants / javax.xml.validation.Validator.validate(new StreamSource(cmmnXmlFile)); // throws if malformed\n// Or quick well-formedness check:\nnew XMLInputFactoryImpl().createXMLStreamReader(new FileInputStream(cmmnXmlFile)); // throws XMLStreamException early","typeGuard":null,"tryCatchPattern":"try {\n    CmmnModel model = cmmnXmlConverter.convertToCmmnModel(inputStream);\n} catch (FlowableException e) {\n    Throwable cause = e.getCause(); // XMLStreamException with line/column\n    throw new IllegalArgumentException(\"Invalid CMMN extension element: \" + (cause != null ? cause.getMessage() : e.getMessage()), e);\n}","preventionTips":["Always schema-validate CMMN XML before conversion","Never hand-edit CMMN XML; use the modeler","Log e.getCause() to get precise line/column info"],"tags":["cmmn","xml-parsing","converter"],"backgroundTag":"file-read-failed","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}