Activiti-osgi: java.lang.ClassNotFoundException: # not found by org.apache.commons.jexl


I am using flowable 5.23 in Apache Karaf 4, when working with the ScriptingEngine, e.g.

<activiti:executionListener event="take" class="org.activiti.engine.impl.bpmn.listener.ScriptExecutionListener">
      <activiti:field name="script">
      <activiti:field name="language">

I get following exception:

2017-09-22 11:29:53,462 | WARN  | pool-54-thread-3 | Extender                         | 221 - activiti-osgi - 5.23.0 | Cannot create ScriptEngineFactory: java.lang.ClassNotFoundException java.lang.ClassNotFoundException: #  not found by org.apache.commons.jexl [140]

Any idea, how to solve this?


The org.activiti.osgi.Extender.BundleScriptEngineResolver resolves two bundles containing a javax.script.ScriptEngineFactory:

Commons JEXL (required by Apache Camel) and the internal one from Flowable (JUEL)

But it does not resolve a JavascriptEngineFactory !?

Edit #2:

Some /META-INF/services/javax.script.ScriptEngineFactory Files have licence info starting with #, this is not ignored by org.activiti.osgi.Extender.resolveScriptEngine():

    String className = in.readLine();
    Class cls = bundle.loadClass(className);

I really think, this is a bug in flowable, but I get no feedback here !?