camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Camel JUEL expression weirdness in 1.6.0
Date Thu, 23 Apr 2009 04:04:05 GMT
On Wed, Apr 22, 2009 at 11:58 PM, ychawla <premiergeneration@yahoo.com> wrote:
>
> 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.
Hi

Thanks for the update. Maybe we/you can report this issue to JUEL so
they can address it in their next release?

Do you know of JUEL 2.1.1 is a new releases? I am trying to follow new
releases and keep Camel trunk up-to-date.
Maybe JUEL have slipped my attention.

>
> 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.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Apache Camel Reference Card:
http://refcardz.dzone.com/refcardz/enterprise-integration

Mime
View raw message