You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "anish.somadevan" <ne...@gmail.com> on 2015/08/06 22:22:06 UTC

Re: Choice with xpath

Am having a similar issue and i get this error message, 

java.lang.ClassCastException: org.apache.xml.dtm.ref.DTMManagerDefault
cannot be cast to org.apache.xml.dtm.DTMManager:
java.lang.ClassCastException: org.apache.xml.dtm.ref.DTMManagerDefault
cannot be cast to org.apache.xml.dtm.DTMManager 
        at org.apache.xml.dtm.DTMManager.newInstance(DTMManager.java:137)
[xalan.jar:] 
        at org.apache.xpath.XPathContext.<init>(XPathContext.java:102)
[xalan.jar:] 
        at org.apache.xpath.XPathContext.<init>(XPathContext.java:349)
[xalan.jar:] 
        at
org.apache.xpath.jaxp.XPathExpressionImpl.eval(XPathExpressionImpl.java:113) 
        at
org.apache.xpath.jaxp.XPathExpressionImpl.eval(XPathExpressionImpl.java:99) 

This is how am trying to retrieve the value, 

<xpath>/CamelData/Provider/text()</xpath>

This is how my XML looks,

<CamelData>
<Provider>ProviderValue</Provider>
</CamelData>

Can you please let me know how to resolve this? 

Thanks,
Anish



--
View this message in context: http://camel.465427.n5.nabble.com/Choice-with-xpath-tp5721410p5770396.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Choice with xpath

Posted by Christian Müller <ch...@gmail.com>.
I suggest adding the camel-saxon dependency and use:
<xpath saxon="true">...</xpath>

Best,

Christian
-----------------

Software Integration Specialist

Apache Member
V.P. Apache Camel | Apache Camel PMC Member | Apache Camel committer
Apache Incubator PMC Member

https://www.linkedin.com/pub/christian-mueller/11/551/642

On Thu, Aug 6, 2015 at 10:22 PM, anish.somadevan <ne...@gmail.com> wrote:

> Am having a similar issue and i get this error message,
>
> java.lang.ClassCastException: org.apache.xml.dtm.ref.DTMManagerDefault
> cannot be cast to org.apache.xml.dtm.DTMManager:
> java.lang.ClassCastException: org.apache.xml.dtm.ref.DTMManagerDefault
> cannot be cast to org.apache.xml.dtm.DTMManager
>         at org.apache.xml.dtm.DTMManager.newInstance(DTMManager.java:137)
> [xalan.jar:]
>         at org.apache.xpath.XPathContext.<init>(XPathContext.java:102)
> [xalan.jar:]
>         at org.apache.xpath.XPathContext.<init>(XPathContext.java:349)
> [xalan.jar:]
>         at
>
> org.apache.xpath.jaxp.XPathExpressionImpl.eval(XPathExpressionImpl.java:113)
>         at
> org.apache.xpath.jaxp.XPathExpressionImpl.eval(XPathExpressionImpl.java:99)
>
> This is how am trying to retrieve the value,
>
> <xpath>/CamelData/Provider/text()</xpath>
>
> This is how my XML looks,
>
> <CamelData>
> <Provider>ProviderValue</Provider>
> </CamelData>
>
> Can you please let me know how to resolve this?
>
> Thanks,
> Anish
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Choice-with-xpath-tp5721410p5770396.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>