Hi,
After updating from version 2.5.0 to 2.7.1the following unit test throws
Caused by: java.lang.ClassCastException:
net.sf.saxon.tinytree.TinyElementImpl cannot be cast to
net.sf.saxon.om.DocumentInfo
I cannot use xquery(neither @XQuery in beans) after xpath expression
//works in 2.5.0
public class XqueryTest extends CamelTestSupport {
protected static final transient Log log = LogFactory
.getLog(XqueryTest.class);
@EndpointInject(uri = "mock:result")
protected MockEndpoint resultEndpoint;
@Produce(uri = "direct:xpath")
protected ProducerTemplate template;
public void testXpathSplitter() throws Exception {
resultEndpoint.expectedMessageCount(1);
template.sendBody("<records><record><type>1</type></record><record><type>2</type></record></records>");
resultEndpoint.assertIsSatisfied();
}
@Override
protected RouteBuilder createRouteBuilder() {
return new RouteBuilder() {
public void configure() {
XPathBuilder splitter = new XPathBuilder("//records/record");
XPathBuilder type1 = new XPathBuilder("//record[type=2]");
from("direct:xpath")
.split(splitter)
.to("log:reply")
.filter().xquery("//record[type=2]") // works filter(type1)
.to("mock:result");
}
};
}
}
--
View this message in context:
http://camel.465427.n5.nabble.com/Unit-test-fails-after-updating-to-2-7-1-Cannot-use-xquery-expression-after-xpath-tp4422582p4422582.html
Sent from the Camel - Users mailing list archive at Nabble.com.