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

jcosano
Champ in-the-making
Champ in-the-making
Solved!

I have two problems:

- Two jobs executors running at same time (activiti-rest and activiti-kick)

- I need delete asm-2.2.3.jar from activiti-rest libs (there is asm-3.2.jar)

jbarrez
Star Contributor
Star Contributor
Tahnks for those findings.

- Two jobs executors running at same time (activiti-rest and activiti-kick)

What was the problem with this? Normally, the job executors should run on multiple machines, going to the same database/

- I need delete asm-2.2.3.jar from activiti-rest libs (there is asm-3.2.jar)

Do you know if the asm-3.2 is from Tomcat itself or is it a dependency of Activiti?

jcosano
Champ in-the-making
Champ in-the-making
Point 1:
If I have two jobs executors running (kick and rest) then I have an error with:
Timer was updated by another transaction concurrently…
Process has a usertask with timer, after 1 min, go to script groovy that increase a variable +1, send a email and return to user task.
Then, I remember that after solve problem with asm, I obtain same error that timer was updated by another transaction, Then I only put off jobexecutor in kick and this error disappears.

Point 2:
All this libs are under activiti-rest/webinf/lib, and I install activiti 5.1 in a new folder, then, all these libs I suppose that are copied by demo.start
(all two are in setup\files\dependencies\libs)

jcosano
Champ in-the-making
Champ in-the-making
Problem when I have asm2.2.3 and asm3.2 was with this class

org.objectweb.asm.ClassWritter

Something about init…


And asm3.2 I think is needed for groovy

jbarrez
Star Contributor
Star Contributor
Ok, that makes sense. Groovy indeed uses asm.

Process has a usertask with timer, after 1 min, go to script groovy that increase a variable +1, send a email and return to user task.
Then, I remember that after solve problem with asm, I obtain same error that timer was updated by another transaction, Then I only put off jobexecutor in kick and this error disappears.

The exception that is thrown can be ignored, since that is the way it works: bot job executors try to lock the same job for executing it. However, one is first and one loses. the one that loses will get the exception, and continue to lock another job. But point taken, maybe the exception shouldnt be displayed in the logs.

malgalad
Champ in-the-making
Champ in-the-making
do you find a resolution for this problem???

thx
malgalad

Problem when I have asm2.2.3 and asm3.2 was with this class

org.objectweb.asm.ClassWritter

Something about init…


And asm3.2 I think is needed for groovy

eye
Champ in-the-making
Champ in-the-making
Hi,

I had the exact same problem and if anyone else has the same problem I post it here. I had a clean activiti 5.1 with a workflow, consisting only of one script task, written in groovy, writing "blubb" to stdout. When started it replied with

00250000 Wrapped Exception (with status template): org.objectweb.asm.ClassWriter.<init>(I)V I got a NoSuchMethodError and could not figure out the problem. This is the stacktrace:

16:46:13,453  ERROR [extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 0
0250000 Wrapped Exception (with status template): org.objectweb.asm.ClassWriter.<init>(I)V
org.springframework.extensions.webscripts.WebScriptException: 00250000 Wrapped Exception (with status template): org.objectweb.asm
.ClassWriter.<init>(I)V
        at org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:742)
        at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:167)
        at org.springframework.extensions.webscripts.PresentationContainer.executeScript(PresentationContainer.java:69)
        at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:333)
        at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:189)
        at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(I)V
        at org.codehaus.groovy.runtime.callsite.CallSiteGenerator.compilePojoMethod(CallSiteGenerator.java:219)
        at org.codehaus.groovy.reflection.CachedMethod.createPojoMetaMethodSite(CachedMethod.java:244)
        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.createCachedMethodSite(PojoMetaMethodSite.java:158)
        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.createPojoMetaMethodSite(PojoMetaMethodSite.java:147)
        at groovy.lang.MetaClassImpl.createPojoCallSite(MetaClassImpl.java:3003)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.createPojoSite(CallSiteArray.java:114)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:148)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
        at org.codehaus.groovy.ast.builder.AstBuilderTransformation.visit(AstBuilderTransformation.groovy:61)
        at org.codehaus.groovy.transform.ASTTransformationVisitor$3.call(ASTTransformationVisitor.java:302)
        at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:814)
        at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:511)
        at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:487)
        at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:464)
        at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:306)
        at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:287)
        at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:267)
        at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:214)
        at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.getScriptClass(GroovyScriptEngineImpl.java:337)
        at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:109)
        at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:79)
        at org.activiti.engine.impl.scripting.ScriptingEngines.evaluate(ScriptingEngines.java:67)
        at org.activiti.engine.impl.bpmn.ScriptTaskActivity.execute(ScriptTaskActivity.java:45)
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:40)
        at org.activiti.engine.impl.runtime.ExecutionEntity.performOperation(ExecutionEntity.java:489)
        at org.activiti.engine.impl.runtime.ExecutionEntity.start(ExecutionEntity.java:285)
        at org.activiti.engine.impl.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:66)
        at org.activiti.engine.impl.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:29)
        at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:22)
        at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:37)
        at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
        at org.activiti.engine.impl.RuntimeServiceImpl.startProcessInstanceById(RuntimeServiceImpl.java:65)
        at org.activiti.rest.api.process.ProcessInstancePost.executeWebScript(ProcessInstancePost.java:45)
        at org.activiti.rest.util.ActivitiWebScript.executeImpl(ActivitiWebScript.java:76)
        at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:64)
        … 17 more

The solution is to delete asm-2.2.3.jar from activiti-5.1\apps\apache-tomcat-6.0.29\webapps\activiti-rest\WEB-INF\lib. asm-3.2.jar is needed and is already placed there if you ran ant demo.setup before.

Hope this helps anybody, it took me hours to figure this out.

Greetings from Germany

Dirk

wiwengweng
Champ in-the-making
Champ in-the-making
I don't have asm-2.2.3 and I have 2.7 in fact, but I encounted with the same problem~

I don't know what the matter is, any one may help??

and also, I had my tomcat running the demo at the same time, does that matter??

adi21
Champ in-the-making
Champ in-the-making
I'm sorry, but I can't see whre in your question you ask for thread-safety.