You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Claus Ibsen <cl...@gmail.com> on 2012/02/02 11:16:31 UTC
Re: Unit test fails after upgrading to 2.9.0. Cannot use xquery
expression after xpath
Hi
Can you post snippets of the route what you are doing?
And where you have a problem?
On Tue, Jan 31, 2012 at 5:47 PM, ltsall <le...@yahoo.com> wrote:
> Hi,
>
> After a long time I tried this unit test in the newest camel 2.9.0 version.
> and it still fails.
>
> Am I missing something? I cound use .convertBodyTo(Document.class) just
> after the splitter but
>
> 1. this is not required in the 2.5 version, unit test succeeds using camel
> 2.5.0.
> 3. I made the test ony to reproduce the issue, and major refactoring is
> needed in order to apply this change in all parts of the existing code.
>
> I want to upgrade my existing camel 2.5.0 application to the newest version
> to use some of the new features.
>
> Should I create a jira ticket for this?
>
> BR,
>
> ltsall
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Unit-test-fails-after-upgrading-to-2-7-1-Cannot-use-xquery-expression-after-xpath-tp4422582p5445078.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/
Re: Unit test fails after upgrading to 2.9.0. Cannot use xquery expression
after xpath
Posted by Willem Jiang <wi...@gmail.com>.
I did a quick fix of issue on the trunk.
The patch was merged into Camel-2.9.x and Camel 2.8.x branches.
On Thu Feb 2 21:21:51 2012, ltsall wrote:
> Hi
>
> I created a jira and attached a unit test
>
> https://issues.apache.org/jira/browse/CAMEL-4970
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Unit-test-fails-after-upgrading-to-2-7-1-Cannot-use-xquery-expression-after-xpath-tp4422582p5450621.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang
Re: Unit test fails after upgrading to 2.9.0. Cannot use xquery
expression after xpath
Posted by ltsall <le...@yahoo.com>.
Hi
I created a jira and attached a unit test
https://issues.apache.org/jira/browse/CAMEL-4970
--
View this message in context: http://camel.465427.n5.nabble.com/Unit-test-fails-after-upgrading-to-2-7-1-Cannot-use-xquery-expression-after-xpath-tp4422582p5450621.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Unit test fails after upgrading to 2.9.0. Cannot use xquery
expression after xpath
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
Can you post the full stack trace?
Yeah if you have a small unit test that can go into camel-saxon, then
fell free to open a JIRA.
On Thu, Feb 2, 2012 at 11:51 AM, ltsall <le...@yahoo.com> wrote:
> Hi Claus,
>
> I created a unit test for this. See my first post.
>
> The problem is when i use an xquery predicate just after an xpath splitter.
>
> from("direct:xpath")
> .split(xpathsplitter)
> .filter().xquery("//record[type=2]")
> .to("mock:result");
>
> This route works in 2.5.0 but fails in 2.9.0 with
> java.lang.ClassCastException: net.sf.saxon.tinytree.TinyElementImpl cannot
> be cast to net.sf.saxon.om.DocumentInfo
>
>
> If i replace xquery predicate with an xpath one , the route works in both
> 2.5.0 and 2.9.0
>
> from("direct:xpath")
> .split(xpathsplitter)
> .filter().xpath("//record[type=2]")
> .to("mock:result");
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Unit-test-fails-after-upgrading-to-2-7-1-Cannot-use-xquery-expression-after-xpath-tp4422582p5450318.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/
Re: Unit test fails after upgrading to 2.9.0. Cannot use xquery
expression after xpath
Posted by ltsall <le...@yahoo.com>.
Hi Claus,
I created a unit test for this. See my first post.
The problem is when i use an xquery predicate just after an xpath splitter.
from("direct:xpath")
.split(xpathsplitter)
.filter().xquery("//record[type=2]")
.to("mock:result");
This route works in 2.5.0 but fails in 2.9.0 with
java.lang.ClassCastException: net.sf.saxon.tinytree.TinyElementImpl cannot
be cast to net.sf.saxon.om.DocumentInfo
If i replace xquery predicate with an xpath one , the route works in both
2.5.0 and 2.9.0
from("direct:xpath")
.split(xpathsplitter)
.filter().xpath("//record[type=2]")
.to("mock:result");
--
View this message in context: http://camel.465427.n5.nabble.com/Unit-test-fails-after-upgrading-to-2-7-1-Cannot-use-xquery-expression-after-xpath-tp4422582p5450318.html
Sent from the Camel - Users mailing list archive at Nabble.com.