最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

java - Apache Camel scripting problem - Stack Overflow

programmeradmin5浏览0评论

I have a very strange problem with Apache ActiveMQ with Camel - I tried the examples with javascript and groovy, but they both produce error "Failed to install route: Failed to create route... because of No language could be found for: groovy"

The groovy example I use is

<route>
    <from uri="queue:foo"/>
    <filter>
        <groovy>request.lineItems.any { i -> i.value > 100 }</groovy>
        <to uri="queue:bar"/>
    </filter>
</route>

The same issue goes for JavaScript. The only scripting that works is "Simple" - the internal Camel scripting language. Please give me advice how to fix this. I am using ActiveMQ 5.2.4 with the integrated Apache Camel 2.4.0.

I have a very strange problem with Apache ActiveMQ with Camel - I tried the examples with javascript and groovy, but they both produce error "Failed to install route: Failed to create route... because of No language could be found for: groovy"

The groovy example I use is

<route>
    <from uri="queue:foo"/>
    <filter>
        <groovy>request.lineItems.any { i -> i.value > 100 }</groovy>
        <to uri="queue:bar"/>
    </filter>
</route>

The same issue goes for JavaScript. The only scripting that works is "Simple" - the internal Camel scripting language. Please give me advice how to fix this. I am using ActiveMQ 5.2.4 with the integrated Apache Camel 2.4.0.

Share Improve this question asked Mar 10, 2011 at 15:40 o15a3d4l11s2o15a3d4l11s2 4,0593 gold badges32 silver badges41 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 9

Yeah you need to add the JARs from camel-script and the scripting language of choice, eg for groovy you need the groovy JAR. If you run AMQ you should drop them in the lib folder.

Do you have a dependency on camel-script fulfilled?

For instance in maven this would be declared as:

<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-script</artifactId>
    <version>2.6.0</version>
</dependency>

In your <dependencies> declaration.

I added artifact camel-groovy because camel-script didn't work for me.

<dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-groovy</artifactId>
        <version>2.23.0</version>
</dependency>
发布评论

评论列表(0)

  1. 暂无评论