cancel
Showing results for 
Search instead for 
Did you mean: 

Scripting Engine Resolution

c_ieva
Champ in-the-making
Champ in-the-making
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
3 REPLIES 3

trademak
Star Contributor
Star Contributor
Hmm interesting, no I don't have a good solution right now, but with some debugging we can see if there's a way to solve it.
Would you be willing to help with that?

Best regards,

c_ieva
Champ in-the-making
Champ in-the-making
Sure, no problem.
Given the JSR223 specs. the task of making the Activiti code compliant with it should be pretty straightforward.
Since this would be the first time I contribute to an open source project, could you please give me just some directions about needed practicalities?

Regards,
Carlo

vasile_dirla
Star Contributor
Star Contributor
Hi Carlo,
As you probably already know this the the repository for Activiti OSS.
https://github.com/Activiti/Activiti
just fork it and after you did your changes into your Activiti repository, you'll have to create a pull request with the changes.