camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: Groovy support stable in 1.3.0?
Date Wed, 03 Feb 2010 01:49:06 GMT
Hi,

Did you put the groovy-all jar and the groovy-engine jar into your class 
path?
I didn't find any unit test error about in the camel-groovy and 
camel-script module.

Here are the maven dependency

         <dependency>
             <groupId>com.sun.script</groupId>
             <artifactId>groovy-engine</artifactId>
             <version>20080611</version>
         </dependency>

         <dependency>
             <groupId>org.codehaus.groovy</groupId>
             <artifactId>groovy-all</artifactId>
             <version>1.7.0</version>
         </dependency>

Willem
/U wrote:
> the same issue is seen on 2.1.0 as well. With the dependency 
> camel.script ver 2.1.0 added, a route with groovy filter fails
> to instantiate with the error
> 
>   java.lang.IllegalArgumentException: No script engine could be created for:
> groovy
> 
> Env: JDK 1.6,Camel 2.1.0
> 
> do I need to include any other jars for jsr223 groovy support. 
> 
> /U
> 
> 
> Seon Lee wrote:
>> I'm having trouble getting groovy support working in release 1.3.0 stable.
>>
>> Here is the stack trace:
>> java.lang.IllegalArgumentException: No script engine could be created for:
>> groovy
>>         at
>> org.apache.camel.builder.script.ScriptBuilder.getEngine(ScriptBuilder.java:381)
>>         at
>> org.apache.camel.builder.script.ScriptBuilder.getScriptContext(ScriptBuilder.java:422)
>>         at
>> org.apache.camel.builder.script.ScriptBuilder.evaluateScript(ScriptBuilder.java:484)
>>         at
>> org.apache.camel.builder.script.ScriptBuilder.matches(ScriptBuilder.java:82)
>>         at
>> org.apache.camel.builder.script.ScriptBuilder.matches(ScriptBuilder.java:49)
>>         at
>> org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:47)
>>         at
>> org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsynProcessorBridge.process(AsyncProcessorTypeConverter.java:44)
>>         at
>> org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:143)
>>         at
>> org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:87)
>>         at
>> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:40)
>>         at
>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:44)
>>         at
>> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:68)
>>         at
>> org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:66)
>>         at
>> org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:531)
>>         at
>> org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:466)
>>         at
>> org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:435)
>>         at
>> org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:322)
>>         at
>> org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:260)
>>         at
>> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:944)
>>
>> Has anyone run into similar problems and have a solution? I've worked with
>> camel-juel and got it's dependencies configured properly. Groovy should
>> have been just as simple but I must be missing something (i've reviewed
>> POMs for camel-groovy and camel-scripting). Any pointers would be much
>> appreciated.
>>
>> BTW this stack trace is generated when a route is activated. Here is a
>> snippet of the routebuilder code that uses groovy:
>>
>>                 when(groovy("in.headers.JMSType { h ->
>> h.startsWith('foobar')}")).
>>                     to("log:fooCategoryName?level=DEBUG")
>>
>>
>>
> 


Mime
View raw message