Hi,

My 5.3.x route doesn't work anymore in 5.4

it's a content-based-router switching on the value of a
header/JMS property 'foo'. I'm testing the route in
the camel console.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<route autoStartup="true" inheritErrorHandler="true" id="SCIFglue5" xmlns:ns2="http://camel.apache.org/schema/web"; xmlns="http://camel.apache.org/schema/spring";>
    <from uri="activemq:test_in"/>
    <choice inheritErrorHandler="true" id="choice2">
        <when inheritErrorHandler="true">
            <xpath>$foo = 'true'</xpath>
<to uri="activemq:test_out_true" inheritErrorHandler="true" id="to6"/>
        </when>
        <otherwise inheritErrorHandler="true">
<to uri="activemq:test_out_other" inheritErrorHandler="true" id="to7"/>
        </otherwise>
    </choice>
</route>


It picks up from test_in, but I get this error in the activemq log:

2010-09-18 01:59:36,205 | ERROR | Failed delivery for exchangeId: ID:vaio-51221-1284757417176-5:22:-1:1:1. Exhausted after delivery attempt: 1 caught: org.apache.camel.builder.xml.InvalidXPathExpression: Invalid xpath: $foo = 'true'.


I know that "$foo = 'true'" isn't valid xpath, but isn't it camel's
way of matching message headers? It worked in 5.3.x and I'm
following the docs here:
http://camel.apache.org/content-based-router.html
http://camel.apache.org/xpath.html

Any ideas where I'm going wrong?

--
Illtud Daniel                                 illtud.dan...@llgc.org.uk
Prif Swyddog Technegol                          Chief Technical Officer
Llyfrgell Genedlaethol Cymru                  National Library of Wales

Reply via email to