You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by noah_bentusi <no...@126.com> on 2013/12/12 10:53:36 UTC
[help] How to use javascript with camel in ServiceMix
I'm with troubles to use javascript with camel in ServiceMix.
My blueprint xml is
<?xml version="1.0" encoding="UTF-8"?>
<blueprint
xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
<camelContext xmlns="http://camel.apache.org/schema/blueprint">
<route>
<from uri="file:bgao/input" />
<log message="happy day!!!" />
<to uri="file:bgao/output" />
</route>
<route>
<from uri="jetty:http://0.0.0.0:9191/test" />
<transform>
<javaScript>"hello world!";</javaScript>
</transform>
<to uri="language:javascript: request.body;" />
</route>
</camelContext>
</blueprint>
I put it into deploy folder, but it can't work.
ServiceMix told me:
ache.aries.blueprint - 0.3.2 | Bundle test.xml is waiting for dependencies [(&(language=js)(objectClass=org.apache.camel.spi.LanguageResolver))]
2013-12-12 17:41:02,694 | ERROR | rint Extender: 1 | BlueprintContainerImpl | 10 - org.apache.aries.blueprint - 0.3.2 | Unable to start blueprint container for bundle test.xml due to unresolved dependencies [(&(language=js)(objectClass=org.apache.camel.spi.LanguageResolver))]
java.util.concurrent.TimeoutException
at org.apache.aries.blueprint.container.BlueprintContainerImpl$1.run(BlueprintContainerImpl.java:293)[10:org.apache.aries.blueprint:0.3.2]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_17]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_17]
at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_17]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_17]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_17]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_17]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_17]
at java.lang.Thread.run(Thread.java:722)[:1.7.0_17]
I have installed camel-script and camel-script-javascript
[installed ] [2.10.7 ] camel-script camel-2.10.7
[installed ] [2.10.7 ] camel-script-javascript camel-2.10.7
anyone know what's wrong with it?
thanks a lot.