Uh, nevermind. Looks like Camel 1.6.0 uses JUEL 2.1.0. I was using JUEL
2.1.1. This might be an issue if Camel upgrades to the next minor version
release of JUEL.
Cheers,
Yogesh
ychawla wrote:
>
> Hello All,
> I am trying to evaluate a header in Camel 1.6.0 using EL expressions.
> Here is my expression:
>
> <filter>
> <el>${in.headers['MyHeader'].startsWith('fooBar')}</el>
> <setHeader
> headerName="someHeader"><constant>false</constant></setHeader>
> </filter>
>
> When I run this, I get an exception:
>
> javax.el.MethodNotFoundException: Cannot resolve method 'startsWith' in
> 'class java.lang.String'
>
> I looked up this forum post by James Strachan:
> http://www.nabble.com/How-do-I-get-a-Content-Based-Router-configured-in-XML-with-ActiveMQ--td15339501.html#a15707041
>
> James suggested downloading the code and using this test:
> JuelLanguageTest. In testElPredicates method, I added this assertion:
>
> assertPredicate("${in.headers['MyHeader'].startsWith('fooBar')}");
>
> and in ExchangeTestSupport I added this header:
>
> in.setHeader("MyHeader", "fooBarber");
>
> Any idea why this would work in Java, but I would get the EL expression in
> a spring route?
>
> Thanks,
> Yogesh
>
--
View this message in context:
http://www.nabble.com/Camel-JUEL-expression-weirdness-in-1.6.0-tp23177119p23177249.html
Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.