cancel
Showing results for 
Search instead for 
Did you mean: 

Can't find scripting engine for 'groovy'

jcosano
Champ in-the-making
Champ in-the-making
Running under tomcat I have this error:

18-ene-2011 11:45:46 org.activiti.engine.impl.interceptor.CommandContext close
GRAVE: Error while closing command context
org.activiti.engine.ActivitiException: Can't find scripting engine for 'groovy'
        at org.activiti.engine.impl.scripting.ScriptingEngines.evaluate(Scriptin
gEngines.java:63)
        at org.activiti.engine.impl.bpmn.ScriptTaskActivity.execute(ScriptTaskAc
tivity.java:45)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.e
xecute(AtomicOperationActivityExecute.java:40)
        at org.activiti.engine.impl.runtime.ExecutionEntity.performOperation(Exe
cutionEntity.java:489)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionDestroy
Scope.execute(AtomicOperationTransitionDestroyScope.java:111)
        at org.activiti.engine.impl.runtime.ExecutionEntity.performOperation(Exe
cutionEntity.java:489)
        at org.activiti.engine.impl.runtime.ExecutionEntity.take(ExecutionEntity
.java:355)
        at org.activiti.engine.impl.runtime.ExecutionEntity.takeAll(ExecutionEnt
ity.java:437)
        at org.activiti.engine.impl.bpmn.BoundaryTimerEventActivity.execute(Boun
daryTimerEventActivity.java:50)
        at org.activiti.engine.impl.jobexecutor.TimerExecuteNestedActivityJobHan
dler.execute(TimerExecuteNestedActivityJobHandler.java:48)
        at org.activiti.engine.impl.runtime.JobEntity.execute(JobEntity.java:79)

        at org.activiti.engine.impl.runtime.TimerEntity.execute(TimerEntity.java
:47)
        at org.activiti.engine.impl.cmd.ExecuteJobsCmd.execute(ExecuteJobsCmd.ja
va:54)
        at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(Comm
andExecutorImpl.java:22)
        at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execut
e(CommandContextInterceptor.java:37)
        at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterc
eptor.java:33)
        at org.activiti.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJ
obsRunnable.java:36)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
        at java.lang.Thread.run(Thread.java:619)


In my activiti\apps\apache-tomcat-6.0.29\webapps\activiti-rest\WEB-INF\lib I have:antlr-2.7.7.jar
asm-3.2.jar
asm-analysis-3.2.jar
asm-commons-3.2.jar
asm-tree-3.2.jar
asm-util-3.2.jar
groovy-1.7.5.jar
14 REPLIES 14

nandoztx
Champ in-the-making
Champ in-the-making
Hi everyone!

The error: "Can't find scripting engine for 'groovy'" it's clearly.
Can't find groovy language, so: check if your groovy libs are in last stable version, tomcat7 can conflict with old groovy versions, or if your groovy dependency declaration in pom.xml is right. I have solved my problem with a correct dependency declaration in pom.xml:

wrong:

dependency>
   <groupId>org.codehaus.groovy</groupId>
   <artifactId>groovy</artifactId>
   <version>2.0.1</version>
  </dependency>

rigth:


dependency>
   <groupId>org.codehaus.groovy</groupId>
   <artifactId>groovy-all</artifactId>
   <version>2.0.1</version>
  </dependency>
Now, it works fine, before this refactoring, scriptTypes "osama" or "groovy" show same error Smiley Wink

My ambient: Activiti 5.10, Tomcat 7.0.22, Groovy 2.0.1

jbarrez
Star Contributor
Star Contributor
okay, thanks for posting this!

jasonwhite01
Champ in-the-making
Champ in-the-making
Thank you! saved me hours!

gavnunns
Champ on-the-rise
Champ on-the-rise
If only I had read this last couple of posts before banging my head against the wall trying to get activiti to notice the groovy scripting engine in version 2.0.x…..  I changed my dependencies back to;
<blockcode>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy</artifactId>
            <version>1.7.5</version>
        </dependency>
</blockcode>
Which worked but its nice to know that to get 2.0.x working the artifactId needs to be <artifactId>groovy-all</artifactId>.

I also verified that it works with the latest version of groovy;

<blockcode>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <version>2.1.3</version>
        </dependency>
</blockcode>

Thanks for the post

jbarrez
Star Contributor
Star Contributor
Yes indeed. The old groovy jar used to contain the scripting engine, but that was changed with the 2.0 version. Now you need to use the -all jar.

I added the note to the docs: https://github.com/Activiti/Activiti/commit/bb96ca6ae22437b0851196abefce88569f13d682