ExecutionListenerTest has errors!

57 views
Skip to first unread message

yanggeorge

unread,
Apr 23, 2012, 1:18:41 AM4/23/12
to Grails Activiti Plugin Discussion Forum
Hi,
I am using GrailsActivitiPlugin and when I follow the
instruction(http://code.google.com/p/grails-activiti-plugin/wiki/
GrailsActivitiCommands) , I found the test-app of
org.activiti.examples.bpmn.executionlistener has errors.
The other 54 tests have passed.
This error is from this code bellow.

ExampleExecutionListenerPojo myPojo = new
ExampleExecutionListenerPojo();
runtimeService.setVariable(processInstance.getId(), "myPojo",
myPojo);

task =
taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult();
assertNotNull(task);
taskService.complete(task.getId());

I am very confused by "Caused by: java.lang.ClassNotFoundException:
org.activiti.examples.bpmn.executionlistener.ExampleExecutionListenerPojo".
My grails version is 2.0.3
and GrailsActivitiPlugin is 5.8.2. and IDE is STS2.9.1 and JDK 6.
Any help I will be grateful.
Thanks in advance.

| Failure:
testExecutionListenersOnAllPossibleElements(org.activiti.examples.bpmn.executionlistener.ExecutionListenerTest)
| org.activiti.engine.ActivitiException: Error while evalutaing
expression
at
org.activiti.engine.impl.el.JuelExpression.getValue(JuelExpression.java:
61)
at
org.activiti.engine.impl.bpmn.listener.ExpressionExecutionListener.notify(ExpressionExecutionListener.java:
35)
at
org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:
42)
at
org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:
76)
at
org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:
497)
at
org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:
492)
at
org.activiti.engine.impl.pvm.runtime.AtomicOperationDeleteCascade.execute(AtomicOperationDeleteCascade.java:
35)
at
org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:
76)
at
org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:
497)
at
org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:
492)
at
org.activiti.engine.impl.persistence.entity.ExecutionEntity.deleteCascade(ExecutionEntity.java:
959)
at
org.activiti.engine.impl.persistence.entity.ExecutionManager.deleteProcessInstance(ExecutionManager.java:
70)
at
org.activiti.engine.impl.persistence.entity.ExecutionManager.deleteProcessInstancesByProcessDefinition(ExecutionManager.java:
37)
at
org.activiti.engine.impl.persistence.entity.DeploymentManager.deleteDeployment(DeploymentManager.java:
55)
at
org.activiti.engine.impl.cmd.DeleteDeploymentCmd.execute(DeleteDeploymentCmd.java:
40)
at
org.activiti.engine.impl.cmd.DeleteDeploymentCmd.execute(DeleteDeploymentCmd.java:
24)
at
org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:
24)
at
org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:
42)
at
org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:
33)
at
org.activiti.engine.impl.RepositoryServiceImpl.deleteDeployment(RepositoryServiceImpl.java:
55)
at
org.activiti.engine.impl.test.TestHelper.annotationDeploymentTearDown(TestHelper.java:
105)
at org.activiti.engine.test.ActivitiRule.finished(ActivitiRule.java:
119)
at org.junit.rules.TestWatchman$1.evaluate(TestWatchman.java:61)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:
68)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:
47)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:24)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at _GrailsTest_groovy$_run_closure4.doCall(_GrailsTest_groovy:290)
at _GrailsTest_groovy$_run_closure2.doCall(_GrailsTest_groovy:248)
at _GrailsTest_groovy
$_run_closure1_closure21.doCall(_GrailsTest_groovy:195)
at _GrailsTest_groovy$_run_closure1.doCall(_GrailsTest_groovy:184)
at TestApp$_run_closure1.doCall(TestApp.groovy:82)
Caused by: org.activiti.engine.ActivitiException: coudn't deserialize
object in variable 'myPojo'
at
org.activiti.engine.impl.variable.SerializableType.getValue(SerializableType.java:
60)
at
org.activiti.engine.impl.persistence.entity.VariableInstanceEntity.getValue(VariableInstanceEntity.java:
158)
at
org.activiti.engine.impl.persistence.entity.VariableScopeImpl.getVariable(VariableScopeImpl.java:
93)
at
org.activiti.engine.impl.el.VariableScopeElResolver.getValue(VariableScopeElResolver.java:
65)
at
org.activiti.engine.impl.javax.el.CompositeELResolver.getValue(CompositeELResolver.java:
231)
at
org.activiti.engine.impl.juel.AstIdentifier.eval(AstIdentifier.java:
81)
at org.activiti.engine.impl.juel.AstMethod.invoke(AstMethod.java:79)
at org.activiti.engine.impl.juel.AstMethod.eval(AstMethod.java:75)
at org.activiti.engine.impl.juel.AstEval.eval(AstEval.java:50)
at org.activiti.engine.impl.juel.AstNode.getValue(AstNode.java:26)
at
org.activiti.engine.impl.juel.TreeValueExpression.getValue(TreeValueExpression.java:
114)
at
org.activiti.engine.impl.delegate.ExpressionGetInvocation.invoke(ExpressionGetInvocation.java:
33)
at
org.activiti.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:
37)
at
org.activiti.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:
25)
at
org.activiti.engine.impl.el.JuelExpression.getValue(JuelExpression.java:
50)
... 44 more
Caused by: java.lang.ClassNotFoundException:
org.activiti.examples.bpmn.executionlistener.ExampleExecutionListenerPojo
at org.codehaus.groovy.tools.RootLoader.findClass(RootLoader.java:
156)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:
128)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName(Class.java:247)
at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:603)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:
1574)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:
1495)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:
1731)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at
org.activiti.engine.impl.variable.SerializableType.getValue(SerializableType.java:
49)
... 58 more
| Running 2 unit tests... 2 of 2
| Completed 2 unit tests, 1 failed in 1828ms

Chee Kin Lim

unread,
Apr 23, 2012, 2:06:05 AM4/23/12
to grails-acti...@googlegroups.com
Hi there,

Thanks for interest to the plugin and running the unit tests. :)

This was known issue which could be fixed by https://github.com/limcheekin/activiti/pull/1 which not released yet.

Please clone the latest plugin's source from https://github.com/limcheekin/activiti, test it out and let's me know the result.

Best regards,
Chee Kin

yanggeorge

unread,
Apr 23, 2012, 3:19:22 AM4/23/12
to Grails Activiti Plugin Discussion Forum
Hi, chee Kin
Thank you very much .
I have cloned the plugin project and imported it and package-plugin it
to grails-activiti.-5.8.2.zip or grails-activiti-5.8.3.zip(change the
version).
with grails2.0.0, I find this plugin can be installed but still has
the test error.
with grails2.0.3, when installing the plugin ,error bellow exists.

org.grails.plugins#activiti;5.8.2: java.lang.NullPointerException at
org.apache.ivy.plugins.resolver.AbstractResolver.initRepositoryCacheManagerFromSettings(AbstractResolver.java:
396)

::::::::::::::::::::::::::::::::::::::::::::::


| Error Could not resolve all dependencies for plugin activiti

On 4月23日, 下午2时06分, Chee Kin Lim <limchee...@vobject.com> wrote:
> Hi there,
>
> Thanks for interest to the plugin and running the unit tests. :)
>
> This was known issue which could be fixed byhttps://github.com/limcheekin/activiti/pull/1which not released yet.
>
> Please clone the latest plugin's source fromhttps://github.com/limcheekin/activiti, test it out and let's me know the

Chee Kin Lim

unread,
Apr 23, 2012, 3:47:49 AM4/23/12
to grails-acti...@googlegroups.com
Hi there,

Thanks for quick response.

As the Grails development team change the plugin repository and I didn't released any version of the plugin to the new repository, you need to update your project's BuildConfig.groovy according to Peter at http://code.google.com/p/grails-activiti-plugin/issues/detail?id=26#c2 and related message from Burt at http://burtbeckwith.com/blog/?p=1337.

By the way, do you mind to share how are you going to use the plugin? If your application don't need to store the domain object or groovy object to process variable, you can ignore the error for time-being.

Hope this help.

Best regards,
Chee Kin

yanggeorge

unread,
Apr 23, 2012, 4:07:28 AM4/23/12
to Grails Activiti Plugin Discussion Forum
Hi Chee Kin,

I wish my project would not meet this need. Thanks for your quick
response.

By the way,
in plugin project, VariableSerializationTests passes.
But in a project, org.activiti.examples.bpmn.executionlistener still
don't pass after install this new plugin.


On 4月23日, 下午3时47分, Chee Kin Lim <limchee...@vobject.com> wrote:
> Hi there,
>
> Thanks for quick response.
>
> As the Grails development team change the plugin repository and I didn't
> released any version of the plugin to the new repository, you need to
> update your project's BuildConfig.groovy according to Peter athttp://code.google.com/p/grails-activiti-plugin/issues/detail?id=26#c2and
> related message from Burt athttp://burtbeckwith.com/blog/?p=1337.
> 阅读更多 »

Chee Kin Lim

unread,
Apr 23, 2012, 6:43:00 AM4/23/12
to grails-acti...@googlegroups.com
Then, it could be a different issue then, thanks for information.

Cheers,
Chee Kin
Reply all
Reply to author
Forward
0 new messages