You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by marcin80 <mt...@gmail.com> on 2010/02/16 17:11:19 UTC
camel-juel + servicemix4
Hi,
I'm using camel, camel-juel 1.6.1 and servicemix 4. I have simple route like
this:
<route>
<camel:from uri="timer:test?period=4000"/>
<camel:setBody>
<camel:constant>This is test message</camel:constant>
</camel:setBody>
<camel:choice>
<camel:when>
<camel:el>${in.body.startsWith('Th')}</camel:el>
<camel:to uri="stream:out"/>
</camel:when>
<camel:otherwise>
<camel:setBody>
<camel:constant>Something else</camel:constant>
</camel:setBody>
<camel:to uri="stream:out"/>
</camel:otherwise>
</camel:choice>
</route>
But when I try deploy and run my bundle into osgi container I get exception
java.lang.NoSuchMethodError:
javax.el.ExpressionFactory.newInstance(Ljava/util/Properties;)Ljavax/el/ExpressionFactory;
at
org.apache.camel.language.juel.JuelExpression.getExpressionFactory(JuelExpression.java:67)
at
org.apache.camel.language.juel.JuelExpression.setVariable(JuelExpression.java:105)
at
org.apache.camel.language.juel.JuelExpression.populateContext(JuelExpression.java:89)
at
org.apache.camel.language.juel.JuelExpression.evaluate(JuelExpression.java:59)
at
org.apache.camel.impl.ExpressionSupport.matches(ExpressionSupport.java:32)
I've installed camel-juel via features install. But I noticed that
juel-2.1.0 bundle imports javax.el package from pax jsp support bundle which
javax.el.ExpressionFactory class don't have newInstance method.
javax.el.ExpressionFactory.newInstance method is in javax.el package inside
juel-2.1.0 bundle.
Where I can find example how to use camel-juel with servicemix?
Cheers,
Marcin
--
View this message in context: http://old.nabble.com/camel-juel-%2B-servicemix4-tp27610700p27610700.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel-juel + servicemix4
Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Feb 17, 2010 at 9:23 AM, marcin80 <mt...@gmail.com> wrote:
>
> Hi,
>
> Thanks for your response. I've upgrade camel to 1.6.2 version but it still
> doesn't work.
You gotta upgrade the JUEL jar as well. So be 100% sure data cache and
whatnot is fully updated. And maybe restart the SMX container.
And frankly you should consider upgrading to use SMX 4.2 with uses
Camel 2.2 which is the first release of SMX 4.x that is recommended
for production usage.
See details at
http://fusesource.com/forums/ann.jspa?annID=92
>
> I'm looking for an examples how to use camel, camel-juel with servicemix 4.
>
> Cheers,
> Marcin
>
> --
> View this message in context: http://old.nabble.com/camel-juel-%2B-servicemix4-tp27610700p27620353.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
--
Claus Ibsen
Apache Camel Committer
Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Re: camel-juel + servicemix4
Posted by marcin80 <mt...@gmail.com>.
Hi,
Thanks for your response. I've upgrade camel to 1.6.2 version but it still
doesn't work.
I'm looking for an examples how to use camel, camel-juel with servicemix 4.
Cheers,
Marcin
--
View this message in context: http://old.nabble.com/camel-juel-%2B-servicemix4-tp27610700p27620353.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel-juel + servicemix4
Posted by Claus Ibsen <cl...@gmail.com>.
On Tue, Feb 16, 2010 at 5:11 PM, marcin80 <mt...@gmail.com> wrote:
>
> Hi,
>
> I'm using camel, camel-juel 1.6.1 and servicemix 4. I have simple route like
> this:
>
> <route>
> <camel:from uri="timer:test?period=4000"/>
> <camel:setBody>
> <camel:constant>This is test message</camel:constant>
> </camel:setBody>
> <camel:choice>
> <camel:when>
> <camel:el>${in.body.startsWith('Th')}</camel:el>
> <camel:to uri="stream:out"/>
> </camel:when>
> <camel:otherwise>
> <camel:setBody>
> <camel:constant>Something else</camel:constant>
> </camel:setBody>
> <camel:to uri="stream:out"/>
> </camel:otherwise>
> </camel:choice>
> </route>
>
> But when I try deploy and run my bundle into osgi container I get exception
>
> java.lang.NoSuchMethodError:
> javax.el.ExpressionFactory.newInstance(Ljava/util/Properties;)Ljavax/el/ExpressionFactory;
> at
> org.apache.camel.language.juel.JuelExpression.getExpressionFactory(JuelExpression.java:67)
> at
> org.apache.camel.language.juel.JuelExpression.setVariable(JuelExpression.java:105)
> at
> org.apache.camel.language.juel.JuelExpression.populateContext(JuelExpression.java:89)
> at
> org.apache.camel.language.juel.JuelExpression.evaluate(JuelExpression.java:59)
> at
> org.apache.camel.impl.ExpressionSupport.matches(ExpressionSupport.java:32)
>
> I've installed camel-juel via features install. But I noticed that
> juel-2.1.0 bundle imports javax.el package from pax jsp support bundle which
> javax.el.ExpressionFactory class don't have newInstance method.
> javax.el.ExpressionFactory.newInstance method is in javax.el package inside
> juel-2.1.0 bundle.
>
> Where I can find example how to use camel-juel with servicemix 4?
>
I think you need Camel 1.6.2 as there was some OSGi issues with the EL
library not working well with OSGi.
> Cheers,
> Marcin
> --
> View this message in context: http://old.nabble.com/camel-juel-%2B-servicemix4-tp27610700p27610700.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
--
Claus Ibsen
Apache Camel Committer
Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus