Hi, A colleague of mine found the problem. It seemed the problem wasn't in this piece of code indeed.
The next piece of the total route picked up this exchange and caused the problem. In there, the xml was read from an InputStream. Since I put a Document on the exchange, this didn't work anymore. Object result = expr.evaluate(new InputSource(exchange.getIn().getBody(InputStream.class)), XPathConstants.NODESET); My colleague changed this into: Document document = exchange.getIn().getBody(Document.class); Object result = expr.evaluate(document, XPathConstants.NODESET); This solved everything. Thanks for your support. With kind regards, Jeroen Veldhorst -- View this message in context: http://www.nabble.com/Exception-on-typeconversion%2C-but-result-is-ok--tp23887671p24032214.html Sent from the Camel - Users mailing list archive at Nabble.com.
