AnsweredAssumed Answered

Scripting Engine Resolution

Question asked by c.ieva on Sep 11, 2015
Latest reply on Sep 13, 2015 by c.ieva
Hi,

I am using Activiti 5.18 within Karaf 4.0.1 and I have the following exception while I try to execute a task with a Groovy script inside:
"org.activiti.engine.ActivitiException: Can't find scripting engine for 'groovy'".

After some debug I have found what I think is a lack of compliance with the JSR 223 standard which states:"…The comment character is '#' (0x23); on each line all characters following the first comment character are ignored."

Looking into the class org.activiti.osgi.Extender.BundleScriptEngineResolver the method resolveScriptEngine makes it evident that the cause of the problem is that the first line read is considered to contain the FQN of the ScriptEngineFactory class but in groovy-all it is not since it contains the Apache disclaimer which leads to a ClassNotFoundException:
"java.lang.ClassNotFoundException: # Licensed to the Apache Software Foundation"

Previous versions of Groovy (i.e. v2.1.3 mentioned elsewhere in this forum) have a configuration file without any disclaimer so they should work.

I would like to use the latest version of Groovy, any suggestion on how to deal with this problem?

Thanks,
Carlo

Outcomes