activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Illtud Daniel <>
Subject xpath $headerName in 5.4
Date Sat, 18 Sep 2010 01:03:49 GMT

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" 
     <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" 
         <otherwise inheritErrorHandler="true">
             <to uri="activemq:test_out_other" 
inheritErrorHandler="true" id="to7"/>

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:

Any ideas where I'm going wrong?

Illtud Daniel                       
Prif Swyddog Technegol                          Chief Technical Officer
Llyfrgell Genedlaethol Cymru                  National Library of Wales

View raw message