You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Francois Liot <fr...@liot.org> on 2013/02/05 15:51:58 UTC

Camel Scripting how-to ?

Hi,

Trying to avoid use of servicemix-scripting jbi, and taking example to camel
blueprint example,
I'm trying to do a camel-script > jython transformer component.

./pom.xml
./src/main/resources/OSGI-INF/blueprint/blueprint.xml
./src/main/resources/org/apache/servicemix/examples/camel/MyTransform.py

./pom.xml


./src/main/resources/OSGI-INF/blueprint/blueprint.xml


./src/main/resources/org/apache/servicemix/examples/camel/MyTransform.py


deploying this component to servicemix 4.4.2 I get :


I do obtain the very same even when I previously install additional features
from Karaf :


Thanks in advance for your support.



--
View this message in context: http://servicemix.396122.n5.nabble.com/Camel-Scripting-how-to-tp5715738.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: Camel Scripting how-to ?

Posted by Freeman Fang <fr...@gmail.com>.
Yeah, you should also install
mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.scripting-api-1.0/1.9.0
which already in camel-script feature.

You should use feature which include all necessary bundles for you.
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: @Freeman小屋

On 2013-2-6, at 上午12:10, Henryk Konsek wrote:

> Hi Francois,
> 
>> Cannot load the
>> scriptEngine for python, the exception is java.lang.NoClassDefFoundError: javax/script/ScriptEngineFactory,
>> please ensure correct JARs is provided on classpath.
> 
> Class javax.script.ScriptEngineFactory is distributed with JRE 6.
> Don't you use JRE 6?
> 
>> install mvn:org.apache.camel/camel-script/2.8.5
> 
> May I ask why don't you use 'feature:install camel-script'? :) It's
> safer than 'bundles:install' as it guarantees to install complete set
> of bundles.
> 
> Best regards.
> 
> --
> Henryk Konsek
> http://henryk-konsek.blogspot.com


Re: Camel Scripting how-to ?

Posted by Henryk Konsek <he...@gmail.com>.
Hi Francois,

> Cannot load the
> scriptEngine for python, the exception is java.lang.NoClassDefFoundError: javax/script/ScriptEngineFactory,
> please ensure correct JARs is provided on classpath.

Class javax.script.ScriptEngineFactory is distributed with JRE 6.
Don't you use JRE 6?

> install mvn:org.apache.camel/camel-script/2.8.5

May I ask why don't you use 'feature:install camel-script'? :) It's
safer than 'bundles:install' as it guarantees to install complete set
of bundles.

Best regards.

--
Henryk Konsek
http://henryk-konsek.blogspot.com