camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hendy Irawan (JIRA)" <>
Subject [jira] [Commented] (CAMEL-3481) camel-script doesn't work in OSGi
Date Thu, 28 Jul 2011 02:45:10 GMT


Hendy Irawan commented on CAMEL-3481:

In my experience, "the ScriptEngineManager that ScriptBuilder uses can't find any scripting
engines except the ones packaged in the JDK" seems incorrect assumption, at least on ServiceMix
4.3.0 / Camel 2.6.0, as I got this:

09:39:26,649 | ERROR | rint Extender: 2 | BlueprintContainerImpl           | 7 - org.apache.aries.blueprint
- 0.2.0.incubating | Unable to start blueprint container for bundle marioteguh-to-tumblr_v2.blueprint.xml
due to unresolved dependencies [(&(language=simple)(objectClass=org.apache.camel.spi.LanguageResolver)),
(&(component=rss)(objectClass=org.apache.camel.spi.ComponentResolver)), (&(language=js)(objectClass=org.apache.camel.spi.LanguageResolver)),
        at org.apache.aries.blueprint.container.BlueprintContainerImpl$[7:org.apache.aries.blueprint:0.2.0.incubating]
        at java.util.concurrent.Executors$[:1.6.0_22]
        at java.util.concurrent.FutureTask$Sync.innerRun([:1.6.0_22]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101([:1.6.0_22]
        at java.util.concurrent.ScheduledThreadPoolExecutor$[:1.6.0_22]
        at java.util.concurrent.ThreadPoolExecutor.runWorker([:1.6.0_22]
        at java.util.concurrent.ThreadPoolExecutor$[:1.6.0_22]

This seems to be the culprit:


I can confirm that there seems to be no bundle that exports this service:

camel-script (210) provides:
language = 
objectClass = org.apache.camel.spi.LanguageResolver = 350
objectClass = org.apache.camel.spi.LanguageResolver
resolver = default = 351

I reported this as bug SMXCOMP-895.

> camel-script doesn't work in OSGi
> ---------------------------------
>                 Key: CAMEL-3481
>                 URL:
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-script
>    Affects Versions: 2.5.0
>            Reporter: Aaron Mulder
>            Assignee: Willem Jiang
>             Fix For: 2.8.0
>         Attachments: camel-core.patch, camel-script.patch
> In an OSGi environment, the ScriptEngineManager that ScriptBuilder uses can't find any
scripting engines except the ones packaged in the JDK (Rhino, maybe AppleScript, etc.).  It's
possible that setting a better ClassLoader would work, or perhaps using a singleton ScriptEngineManager
and setting up the scripting engines in an OSGi Activator instead of relying on the META-INF
lookup every time a script is invoked.

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message