You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "metatech (JIRA)" <ji...@apache.org> on 2014/04/28 09:09:16 UTC

[jira] [Commented] (SMX4-1373) infinite loop in BundleFactoryLoader

    [ https://issues.apache.org/jira/browse/SMX4-1373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13982799#comment-13982799 ] 

metatech commented on SMX4-1373:
--------------------------------

This problem prevents from using JavaScript expressions in camel routes in ServiceMix 4.5.3.
The bundle "commons-jexl" contains a file "META-INF/services/javax.script.ScriptEngineFactory" with '#' at the beginning of several lines.
This bundle is installed by default, because it is a dependency of feature "activemq-blueprint".
The workaround is to edit the file, remove all the lines starting with '#', replace it in the JAR file, and do an "osgi:update" of the bundle "commons-jexl".
The stack trace during the infinite loop is the following :
{code}
	org.apache.servicemix.specs.locator.Activator$BundleFactoryLoader.call(Activator.java:156)
	org.apache.servicemix.specs.locator.Activator$BundleFactoryLoader.call(Activator.java:131)
	org.apache.servicemix.specs.locator.OsgiLocator.locateAll(OsgiLocator.java:159)
	org.apache.servicemix.specs.locator.OsgiLocator.locateAll(OsgiLocator.java:147)
	javax.script.ScriptEngineManager.getEngineByName(ScriptEngineManager.java:98)
	org.apache.camel.builder.script.ScriptBuilder.createScriptEngine(ScriptBuilder.java:279)
	org.apache.camel.builder.script.ScriptBuilder.getEngine(ScriptBuilder.java:198)
	org.apache.camel.builder.script.ScriptBuilder.getScriptContext(ScriptBuilder.java:245)
	org.apache.camel.builder.script.ScriptBuilder.evaluateScript(ScriptBuilder.java:338)
	org.apache.camel.builder.script.ScriptBuilder.matches(ScriptBuilder.java:101)
	org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:66)
{code}
Thanks for the original reporter for the hint and to Freeman for the fix.

> infinite loop in BundleFactoryLoader
> ------------------------------------
>
>                 Key: SMX4-1373
>                 URL: https://issues.apache.org/jira/browse/SMX4-1373
>             Project: ServiceMix 4
>          Issue Type: Bug
>            Reporter: Freeman Fang
>            Assignee: Freeman Fang
>             Fix For: specs-2.3.0
>
>




--
This message was sent by Atlassian JIRA
(v6.2#6252)