[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlrpc-user
Subject:    [jira] [Updated] (AXIOM-487) IllegalStateException when processing DOMSource with namespace unaware 
From:       "Andreas Veithen (JIRA)" <jira () apache ! org>
Date:       2016-10-09 20:58:20
Message-ID: JIRA.13003854.1473427303000.777784.1476046700640 () Atlassian ! JIRA
[Download RAW message or body]


     [ https://issues.apache.org/jira/browse/AXIOM-487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel \
]

Andreas Veithen updated AXIOM-487:
----------------------------------
    Component/s: LLOM
                 DOOM

> IllegalStateException when processing DOMSource with namespace unaware attributes
> ---------------------------------------------------------------------------------
> 
> Key: AXIOM-487
> URL: https://issues.apache.org/jira/browse/AXIOM-487
> Project: Axiom
> Issue Type: Bug
> Components: DOOM, LLOM
> Affects Versions: 1.2.17, 1.2.19
> Reporter: Victor
> Priority: Minor
> 
> Hello,
> I tried to parse a java.xml.transform.Source (a DOMSource) using the following \
> code: {code}
> final OMXMLParserWrapper builder = OMXMLBuilderFactory.createOMBuilder(factory, \
> source); final OMElement bodyContent = builder.getDocumentElement();
> {code}
> The document contains:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <tns:executeJobResponse \
> xmlns:tns="http://petals.ow2.org/talend/ArticleImporterJob/" \
> xmlns:jaxb="http://jaxb.dev.java.net/array" \
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <tns:talend-job-output>
> <tns:executionResult>
> <jaxb:item>0</jaxb:item>
> </tns:executionResult>
> <tns:outAttachment>
> <tns:fileResult>
> <tns:fileContent>
> <xop:include xmlns:xop="http://www.w3.org/2004/08/xop/include" \
> href="cid:fileResult" /> </tns:fileContent>
> </tns:fileResult>
> </tns:outAttachment>
> </tns:talend-job-output>
> </tns:executeJobResponse>
> {code}
> And I got the following error:
> {noformat}
> java.lang.IllegalStateException
> 	at org.apache.axiom.om.impl.common.AxiomNamedInformationItemSupport.ajc$interMethod \
> $org_apache_axiom_om_impl_common_AxiomNamedInformationItemSupport$org_apache_axiom_o \
> m_impl_intf_AxiomNamedInformationItem$updateLocalName(AxiomNamedInformationItemSupport.aj:142)
>   at org.apache.axiom.om.impl.llom.OMAttributeImpl.updateLocalName(OMAttributeImpl.java:1)
>   at org.apache.axiom.om.impl.common.AxiomNamedInformationItemSupport.ajc$interMetho \
> dDispatch1$org_apache_axiom_om_impl_common_AxiomNamedInformationItemSupport$org_apac \
> he_axiom_om_impl_intf_AxiomNamedInformationItem$updateLocalName(AxiomNamedInformationItemSupport.aj)
>   at org.apache.axiom.om.impl.common.AxiomNamedInformationItemSupport.ajc$interMetho \
> d$org_apache_axiom_om_impl_common_AxiomNamedInformationItemSupport$org_apache_axiom_ \
> om_impl_intf_AxiomNamedInformationItem$coreGetLocalName(AxiomNamedInformationItemSupport.aj:147)
>   at org.apache.axiom.om.impl.llom.OMAttributeImpl.coreGetLocalName(OMAttributeImpl.java:1)
>   at org.apache.axiom.core.NSAwareAttributeMatcher.getName(NSAwareAttributeMatcher.java:84)
>   at org.apache.axiom.core.CoreElementSupport.ajc$interMethod$org_apache_axiom_core_ \
> CoreElementSupport$org_apache_axiom_core_CoreElement$coreSetAttribute(CoreElementSupport.aj:96)
>   at org.apache.axiom.om.impl.llom.OMElementImpl.coreSetAttribute(OMElementImpl.java:1)
>   at org.apache.axiom.om.impl.common.AxiomElementSupport.ajc$interMethod$org_apache_ \
> axiom_om_impl_common_AxiomElementSupport$org_apache_axiom_om_impl_intf_AxiomElement$internalAppendAttribute(AxiomElementSupport.aj:282)
>   at org.apache.axiom.om.impl.llom.OMElementImpl.internalAppendAttribute(OMElementImpl.java:1)
>   at org.apache.axiom.om.impl.common.AxiomElementSupport.ajc$interMethodDispatch1$or \
> g_apache_axiom_om_impl_common_AxiomElementSupport$org_apache_axiom_om_impl_intf_AxiomElement$internalAppendAttribute(AxiomElementSupport.aj)
>   at org.apache.axiom.om.impl.common.AxiomElementSupport.ajc$interMethod$org_apache_ \
> axiom_om_impl_common_AxiomElementSupport$org_apache_axiom_om_impl_intf_AxiomElement$addAttribute(AxiomElementSupport.aj:296)
>   at org.apache.axiom.om.impl.llom.OMElementImpl.addAttribute(OMElementImpl.java:1)
> 	at org.apache.axiom.om.impl.common.AxiomElementSupport.ajc$interMethodDispatch1$org \
> _apache_axiom_om_impl_common_AxiomElementSupport$org_apache_axiom_om_impl_intf_AxiomElement$addAttribute(AxiomElementSupport.aj)
>   at org.apache.axiom.om.impl.common.AxiomElementSupport.ajc$interMethod$org_apache_ \
> axiom_om_impl_common_AxiomElementSupport$org_apache_axiom_om_impl_intf_AxiomElement$addAttribute(AxiomElementSupport.aj:312)
>   at org.apache.axiom.om.impl.llom.OMElementImpl.addAttribute(OMElementImpl.java:1)
> 	at org.apache.axiom.om.impl.builder.StAXBuilder.processAttributes(StAXBuilder.java:247)
>   at org.apache.axiom.om.impl.builder.StAXOMBuilder.populateOMElement(StAXOMBuilder.java:418)
>   at org.apache.axiom.om.impl.builder.StAXOMBuilder.createOMElement(StAXOMBuilder.java:434)
>   at org.apache.axiom.om.impl.builder.StAXOMBuilder.createNextOMElement(StAXOMBuilder.java:298)
>   at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:215)
> 	at org.apache.axiom.core.CoreParentNodeSupport.ajc$interMethod$org_apache_axiom_cor \
> e_CoreParentNodeSupport$org_apache_axiom_core_CoreParentNode$buildNext(CoreParentNodeSupport.aj:96)
>   at org.apache.axiom.om.impl.llom.OMDocumentImpl.buildNext(OMDocumentImpl.java:1)
> 	at org.apache.axiom.core.CoreParentNodeSupport.ajc$interMethodDispatch1$org_apache_ \
> axiom_core_CoreParentNodeSupport$org_apache_axiom_core_CoreParentNode$buildNext(CoreParentNodeSupport.aj)
>   at org.apache.axiom.core.CoreParentNodeSupport.ajc$interMethod$org_apache_axiom_co \
> re_CoreParentNodeSupport$org_apache_axiom_core_CoreParentNode$coreGetFirstChild(CoreParentNodeSupport.aj:113)
>   at org.apache.axiom.om.impl.llom.OMDocumentImpl.coreGetFirstChild(OMDocumentImpl.java:1)
>   at org.apache.axiom.core.CoreParentNodeSupport.ajc$interMethodDispatch1$org_apache \
> _axiom_core_CoreParentNodeSupport$org_apache_axiom_core_CoreParentNode$coreGetFirstChild(CoreParentNodeSupport.aj)
>   at org.apache.axiom.core.CoreDocumentSupport.ajc$interMethod$org_apache_axiom_core \
> _CoreDocumentSupport$org_apache_axiom_core_CoreDocument$coreGetDocumentElement(CoreDocumentSupport.aj:42)
>   at org.apache.axiom.om.impl.llom.OMDocumentImpl.coreGetDocumentElement(OMDocumentImpl.java:1)
>   at org.apache.axiom.om.impl.common.AxiomDocumentSupport.ajc$interMethod$org_apache \
> _axiom_om_impl_common_AxiomDocumentSupport$org_apache_axiom_om_impl_intf_AxiomDocument$getOMDocumentElement(AxiomDocumentSupport.aj:32)
>   at org.apache.axiom.om.impl.llom.OMDocumentImpl.getOMDocumentElement(OMDocumentImpl.java:1)
>   at org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:554)
>   at org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:550)
>  {noformat}
> Here is a simple executable example of the problem:
> {code}
> import javax.xml.parsers.DocumentBuilderFactory;
> import javax.xml.parsers.ParserConfigurationException;
> import javax.xml.transform.dom.DOMSource;
> import org.apache.axiom.om.OMElement;
> import org.apache.axiom.om.OMXMLBuilderFactory;
> import org.apache.axiom.om.OMXMLParserWrapper;
> import org.w3c.dom.Document;
> import org.w3c.dom.Element;
> public class AxiomTest {
> public static final String XSI_TNS = "http://www.w3.org/2001/XMLSchema-instance";
> public static void main(String[] args) throws ParserConfigurationException {
> Document outputDocument = \
> DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); Element \
> rootElement = outputDocument.createElementNS("http://test/", \
> "tns:executeJobResponse"); outputDocument.appendChild(rootElement);
> rootElement.setAttribute("xmlns:xsi", XSI_TNS);
> final OMXMLParserWrapper builder = OMXMLBuilderFactory.createOMBuilder(new \
> DOMSource(outputDocument)); final OMElement bodyContent = \
> builder.getDocumentElement(); }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic