[
https://issues.apache.org/jira/browse/CAMEL-6922?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Arseniy Tashoyan updated CAMEL-6922:
------------------------------------
Description:
XmlConvertor cannot convert from org.apache.xerces.dom.ElementNSImpl to
org.w3c.dom.Document. Class ElementNSImpl implements both interfaces
org.w3c.dom.Node and org.w3c.dom.NodeList. While type converter lookup iterates
from ElementNSImpl through it's superclasses and implemented interfaces, it
reaches NodeList first. Therefore the
{color:green}
Node toDOMNodeFromSingleNodeList(NodeList)
{color}
method is selected for conversion. However this method returns null for any
NodeList with more than one node. This leads to null in a message's body.
This issue is not detected on Linux, because on Oracle JDK lookup reaches Node
before NodeList and
{color:green}
Document toDOMDocument(Node)
{color}
method is selected for conversion.
was:
XmlConvertor cannot convert from org.apache.xerces.dom.ElementNSImpl to
org.w3c.dom.Document. Class ElementNSImpl implements both interfaces
org.w3c.dom.Node and org.w3c.dom.NodeList. While type converter lookup iterates
from ElementNSImpl through it's superclasses and implemented interfaces, it
reaches NodeList first. Therefore the
Node toDOMNodeFromSingleNodeList(NodeList)
method is selected for conversion. However this method returns null for any
NodeList with more than one node. This leads to null in a message's body.
This issue is not detected on Linux, because on Oracle JDK lookup reaches Node
before NodeList and
Document toDOMDocument(Node)
method is selected for conversion.
> XmlConverter cannot convert from ElementNSImpl to Document
> ----------------------------------------------------------
>
> Key: CAMEL-6922
> URL: https://issues.apache.org/jira/browse/CAMEL-6922
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.11.2
> Environment: HP-UX, JDK 6.14, 7.06
> Reporter: Arseniy Tashoyan
> Priority: Minor
> Labels: converter, dom, xml
>
> XmlConvertor cannot convert from org.apache.xerces.dom.ElementNSImpl to
> org.w3c.dom.Document. Class ElementNSImpl implements both interfaces
> org.w3c.dom.Node and org.w3c.dom.NodeList. While type converter lookup
> iterates from ElementNSImpl through it's superclasses and implemented
> interfaces, it reaches NodeList first. Therefore the
> {color:green}
> Node toDOMNodeFromSingleNodeList(NodeList)
> {color}
> method is selected for conversion. However this method returns null for any
> NodeList with more than one node. This leads to null in a message's body.
> This issue is not detected on Linux, because on Oracle JDK lookup reaches
> Node before NodeList and
> {color:green}
> Document toDOMDocument(Node)
> {color}
> method is selected for conversion.
--
This message was sent by Atlassian JIRA
(v6.1#6144)