You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am unable to parse the below XML. To be precise, I've implemented my own DataFormatConfigurator and set NamespaceAware to false to ignore namespaces. It works fine without <a:WorkflowTemplateId i:nil="true" />. From the debug logs, I can confirm that the DocumentBuilderFactory is using the custom configuration to ignore namespace.
16:27:45.661 [main] INFO org.camunda.spin - SPIN-01010 Discovered Spin data format provider: org.camunda.spin.impl.json.jackson.format.JacksonJsonDataFormatProvider[name = application/json]
16:27:46.053 [main] INFO org.camunda.spin - SPIN-01010 Discovered Spin data format provider: org.camunda.spin.impl.xml.dom.format.DomXmlDataFormatProvider[name = application/xml]
16:27:46.060 [main] DEBUG org.camunda.spin.xml - SPIN/DOM-XML-01003 DocumentBuilderFactory configuration 'namespaceAware' 'true'
16:27:46.060 [main] DEBUG org.camunda.spin.xml - SPIN/DOM-XML-01003 DocumentBuilderFactory configuration 'validating' 'false'
16:27:46.060 [main] DEBUG org.camunda.spin.xml - SPIN/DOM-XML-01003 DocumentBuilderFactory configuration 'ignoringComments' 'true'
16:27:46.060 [main] DEBUG org.camunda.spin.xml - SPIN/DOM-XML-01003 DocumentBuilderFactory configuration 'ignoringElementContentWhitespace' 'false'
16:27:46.066 [main] DEBUG org.camunda.spin.xml - SPIN/DOM-XML-01001 Using document builder factory 'com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl'
16:27:46.072 [main] INFO org.camunda.spin - SPIN-01011 Discovered Spin data format configurator: class com.sample.myworkflow.config.CustomXmlDataFormatter[dataformat = org.camunda.spin.impl.xml.dom.format.DomXmlDataFormat]
16:27:46.073 [main] DEBUG org.camunda.spin.xml - SPIN/DOM-XML-01003 DocumentBuilderFactory configuration 'namespaceAware' 'false'
16:27:46.074 [main] INFO org.camunda.spin - SPIN-01009 Discovered Spin data format: org.camunda.spin.impl.xml.dom.format.DomXmlDataFormat[name = application/xml]
16:27:46.074 [main] INFO org.camunda.spin - SPIN-01009 Discovered Spin data format: org.camunda.spin.impl.json.jackson.format.JacksonJsonDataFormat[name = application/json]
16:27:46.117 [main] DEBUG org.camunda.spin.xml - SPIN/DOM-XML-01002 Successfully created new document builder
16:27:46.117 [main] DEBUG org.camunda.spin.xml - SPIN/DOM-XML-01004 Parsing input into DOM document.
16:27:46.165 [main] INFO com.sample.myworkflow.utils.SampleClass - ID = 8115548
16:27:46.166 [main] DEBUG org.camunda.spin.xml - SPIN/DOM-XML-01002 Successfully created new document builder
16:27:46.166 [main] DEBUG org.camunda.spin.xml - SPIN/DOM-XML-01004 Parsing input into DOM document.
ERROR: 'Namespace for prefix 'i' has not been declared.'
SLF4J: Failed toString() invocation on an object of type [org.camunda.spin.impl.SpinListImpl]
Reported exception:
org.camunda.spin.xml.SpinXmlElementException: SPIN/DOM-XML-01022 Unable to transform element 'null:a:Task'
at org.camunda.spin.impl.xml.dom.DomXmlLogger.unableToTransformElement(DomXmlLogger.java:127)
at org.camunda.spin.impl.xml.dom.format.DomXmlDataFormatWriter.writeResult(DomXmlDataFormatWriter.java:56)
at org.camunda.spin.impl.xml.dom.format.DomXmlDataFormatWriter.writeToWriter(DomXmlDataFormatWriter.java:47)
at org.camunda.spin.impl.xml.dom.DomXmlElement.writeToWriter(DomXmlElement.java:373)
at org.camunda.spin.impl.xml.dom.DomXmlElement.toString(DomXmlElement.java:368)
at java.lang.String.valueOf(String.java:2994)
at java.lang.StringBuilder.append(StringBuilder.java:131)
at java.util.AbstractCollection.toString(AbstractCollection.java:462)
at org.slf4j.helpers.MessageFormatter.safeObjectAppend(MessageFormatter.java:299)
at org.slf4j.helpers.MessageFormatter.deeplyAppendParameter(MessageFormatter.java:271)
at org.slf4j.helpers.MessageFormatter.arrayFormat(MessageFormatter.java:233)
at org.slf4j.helpers.MessageFormatter.arrayFormat(MessageFormatter.java:173)
at ch.qos.logback.classic.spi.LoggingEvent.getFormattedMessage(LoggingEvent.java:293)
at ch.qos.logback.classic.spi.LoggingEvent.prepareForDeferredProcessing(LoggingEvent.java:206)
at ch.qos.logback.core.OutputStreamAppender.subAppend(OutputStreamAppender.java:205)
at ch.qos.logback.core.OutputStreamAppender.append(OutputStreamAppender.java:100)
at ch.qos.logback.core.UnsynchronizedAppenderBase.doAppend(UnsynchronizedAppenderBase.java:84)
at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:51)
at ch.qos.logback.classic.Logger.appendLoopOnAppenders(Logger.java:270)
at ch.qos.logback.classic.Logger.callAppenders(Logger.java:257)
at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:421)
at ch.qos.logback.classic.Logger.filterAndLog_1(Logger.java:398)
at ch.qos.logback.classic.Logger.info(Logger.java:583)
at com.sample.myworkflow.utils.SampleClass.main(SampleClass.java:54)
Caused by: javax.xml.transform.TransformerException: java.lang.RuntimeException: Namespace for prefix 'i' has not been declared.
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:746)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:351)
at org.camunda.spin.impl.xml.dom.format.DomXmlDataFormatWriter.writeResult(DomXmlDataFormatWriter.java:54)
... 22 more
Caused by: java.lang.RuntimeException: Namespace for prefix 'i' has not been declared.
at com.sun.org.apache.xml.internal.serializer.SerializerBase.getNamespaceURI(SerializerBase.java:915)
at com.sun.org.apache.xml.internal.serializer.SerializerBase.addAttribute(SerializerBase.java:431)
at com.sun.org.apache.xml.internal.serializer.ToUnknownStream.addAttribute(ToUnknownStream.java:316)
at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:201)
at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:230)
at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:94)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:693)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:737)
... 24 more
16:27:46.178 [main] INFO com.sample.myworkflow.utils.SampleClass - spinXmlElementSpinList = [FAILED toString()]
The text was updated successfully, but these errors were encountered:
Hi,
I am unable to parse the below XML. To be precise, I've implemented my own DataFormatConfigurator and set NamespaceAware to false to ignore namespaces. It works fine without
<a:WorkflowTemplateId i:nil="true" />
. From the debug logs, I can confirm that the DocumentBuilderFactory is using the custom configuration to ignore namespace.Attaching sample code to test:
Logs:
The text was updated successfully, but these errors were encountered: