unfortunately, with both groovy engine, groovy-all and camel-script,
my routes with groovy filter still yield the same error:
"No script engine could be created: groovy"
<from uri="jms:queue:foo"/>
<choice>
<when>
<groovy>request.lineItems.grep({ it > 50 })</groovy>
<to uri="file:///C:/tmp/Senior.txt" />
</when>
//...
Dependencies:
<groupId>org.apache.camel</groupId>
<artifactId>camel-script</artifactId>
<version>2.1</version>
<groupId>com.sun.script</groupId>
<artifactId>groovy-engine</artifactId>
<version>20080611</version>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>1.7.0</version>
am i missing s.th?
can you plz point me to camel unit test cases using groovy routes.
/U
willem.jiang wrote:
>
> Hi
>
> Here is the repo url
> http://svn.apache.org/repos/asf/servicemix/m2-repo
>
> Willem
>
> /U wrote:
>> many thanks for your help. I thought groovy engine was in the camel
>> packages.
>> can you tell me which maven repo has groovy-engine artifact.
>>
>> many thanx!
>>
>>
>>
>> willem.jiang wrote:
>>> 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")
>>>>>
>>>>>
>>>>>
>>>
>>>
>>
>
>
>
--
View this message in context:
http://old.nabble.com/Groovy-support-stable-in-1.3.0--tp17874313p27444968.html
Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.