AnsweredAssumed Answered

Loader constraint violation error

Question asked by limcheekin on Oct 5, 2010
Latest reply on Oct 6, 2010 by limcheekin
Hi,

I managed to port all examples from JUnit3 to JUnit4 style. But there are still 4 tests failed with error in Grails environment for the following two Test classes:
org.activiti.examples.bpmn.scripttask.ScriptTaskTest

loader constraint violation: when resolving overridden method "org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.getFactory()Ljavax/script/ScriptEngineFactory;" the class loader (instance of org/codehaus/groovy/grails/cli/support/GrailsRootLoader) of the current class, org/codehaus/groovy/jsr223/GroovyScriptEngineImpl, and its superclass loader (instance of <bootloader>), have different Class objects for the type javax/script/ScriptEngineFactory used in the signature

java.lang.LinkageError: loader constraint violation: when resolving overridden method "org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.getFactory()Ljavax/script/ScriptEngineFactory;" the class loader (instance of org/codehaus/groovy/grails/cli/support/GrailsRootLoader) of the current class, org/codehaus/groovy/jsr223/GroovyScriptEngineImpl, and its superclass loader (instance of ), have different Class objects for the type javax/script/ScriptEngineFactory used in the signature
at org.codehaus.groovy.jsr223.GroovyScriptEngineFactory.getScriptEngine(GroovyScriptEngineFactory.java:104)
at javax.script.ScriptEngineManager.getEngineByName(ScriptEngineManager.java:133)
at org.activiti.engine.impl.scripting.ScriptingEngines.evaluate(ScriptingEngines.java:60)
at org.activiti.engine.impl.bpmn.ScriptTaskActivity.execute(ScriptTaskActivity.java:45)
at org.activiti.pvm.impl.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:40)
at org.activiti.pvm.impl.runtime.ExecutionImpl.performOperation(ExecutionImpl.java:523)
at org.activiti.pvm.impl.runtime.ExecutionImpl.start(ExecutionImpl.java:362)
at org.activiti.engine.impl.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:64)
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:36)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
at org.activiti.engine.impl.RuntimeServiceImpl.startProcessInstanceByKey(RuntimeServiceImpl.java:46)
at org.activiti.examples.bpmn.scripttask.ScriptTaskTest.testScriptExecution(ScriptTaskTest.java:38)

org.activiti.examples.taskforms.TaskFormsTest

loader constraint violation: when resolving overridden method "org.activiti.engine.impl.scripting.JuelScriptEngine.getFactory()Ljavax/script/ScriptEngineFactory;" the class loader (instance of org/codehaus/groovy/grails/cli/support/GrailsRootLoader) of the current class, org/activiti/engine/impl/scripting/JuelScriptEngine, and its superclass loader (instance of <bootloader>), have different Class objects for the type javax/script/ScriptEngineFactory used in the signature

java.lang.LinkageError: loader constraint violation: when resolving overridden method "org.activiti.engine.impl.scripting.JuelScriptEngine.getFactory()Ljavax/script/ScriptEngineFactory;" the class loader (instance of org/codehaus/groovy/grails/cli/support/GrailsRootLoader) of the current class, org/activiti/engine/impl/scripting/JuelScriptEngine, and its superclass loader (instance of ), have different Class objects for the type javax/script/ScriptEngineFactory used in the signature
at org.activiti.engine.impl.scripting.JuelScriptEngineFactory.getScriptEngine(JuelScriptEngineFactory.java:129)
at javax.script.ScriptEngineManager.getEngineByName(ScriptEngineManager.java:133)
at org.activiti.engine.impl.scripting.ScriptingEngines.evaluate(ScriptingEngines.java:60)
at org.activiti.engine.impl.cmd.GetRenderedFormCmd.execute(GetRenderedFormCmd.java:92)
at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:22)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:36)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
at org.activiti.engine.impl.TaskServiceImpl.getRenderedStartFormByKey(TaskServiceImpl.java:115)
at org.activiti.examples.taskforms.TaskFormsTest.testTaskFormsWithVacationRequestProcess(TaskFormsTest.java:59)

Attached here source codes of activiti examples in JUnit4 style.
[attachment=0]activiti-examples-junit4.zip[/attachment]

Any idea how to fix the error? Please advice.

Regards,
Chee Kin

Attachments

Outcomes