AnsweredAssumed Answered

How to 'deploy' a TaskListener?

Question asked by bhj2 on Jun 30, 2011
Latest reply on Jul 4, 2011 by bhj2
Hello,

I would like to add a tasklistener to my process but am only using my own version of the explorer(and not probe, cycle, …).

I created my bpmn20 process containing a usertask and a listener:


<userTask id="writeSomethingTask" name="Write something" activiti:formKey="org/activiti/mytestversion/processes/someform.form" activiti:assignee="${initiator}">
   <documentation>Write something.</documentation>
   <extensionElements>
      <activiti:taskListener event="create" class="org.activiti.mytestversion.listeners.myTaskListener" />
   </extensionElements>
</userTask>

The problem is that when I start my process, the listener is not found. I got the following exception:

com.vaadin.event.ListenerMethod$MethodException
Cause: java.lang.NoClassDefFoundError: org/activiti/engine/impl/persistence/entity/ExecutionEntity
   at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)
   at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:162)
   at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1166)
   at com.vaadin.ui.Button.fireClick(Button.java:380)
   at com.vaadin.ui.Button.changeVariables(Button.java:196)
   at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariableBurst(AbstractCommunicationManager.java:1297)
   at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(AbstractCommunicationManager.java:1217)
   at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:733)
   at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:296)
   at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:483)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
   at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1534)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
   at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
   at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
   at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
   at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:326)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
   at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:170)
   at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
   at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
   at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
   at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
   at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
   at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
   at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
   at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
   at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
   at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
   at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
   at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
   at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
   at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NoClassDefFoundError: org/activiti/engine/impl/persistence/entity/ExecutionEntity
   at ch.glue.egovrunner.explorer.listeners.OsisTaskCreateListener.notify(OsisTaskCreateListener.java:35)
   at org.activiti.engine.impl.bpmn.helper.ClassDelegate.notify(ClassDelegate.java:82)
   at org.activiti.engine.impl.task.TaskEntity.fireEvent(TaskEntity.java:478)
   at org.activiti.engine.impl.bpmn.behavior.UserTaskActivityBehavior.execute(UserTaskActivityBehavior.java:70)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:40)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:63)
   at org.activiti.engine.impl.runtime.ExecutionEntity.performOperation(ExecutionEntity.java:496)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerStart.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerStart.java:48)
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:52)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:63)
   at org.activiti.engine.impl.runtime.ExecutionEntity.performOperation(ExecutionEntity.java:496)
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:45)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:63)
   at org.activiti.engine.impl.runtime.ExecutionEntity.performOperation(ExecutionEntity.java:496)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionCreateScope.execute(AtomicOperationTransitionCreateScope.java:44)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:63)
   at org.activiti.engine.impl.runtime.ExecutionEntity.performOperation(ExecutionEntity.java:496)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake.execute(AtomicOperationTransitionNotifyListenerTake.java:61)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:63)
   at org.activiti.engine.impl.runtime.ExecutionEntity.performOperation(ExecutionEntity.java:496)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionDestroyScope.execute(AtomicOperationTransitionDestroyScope.java:111)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:63)
   at org.activiti.engine.impl.runtime.ExecutionEntity.performOperation(ExecutionEntity.java:496)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerEnd.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerEnd.java:36)
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:52)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:63)
   at org.activiti.engine.impl.runtime.ExecutionEntity.performOperation(ExecutionEntity.java:496)
   at org.activiti.engine.impl.runtime.ExecutionEntity.take(ExecutionEntity.java:341)
   at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performOutgoingBehavior(BpmnActivityBehavior.java:92)
   at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performDefaultOutgoingBehavior(BpmnActivityBehavior.java:49)
   at org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.leave(FlowNodeActivityBehavior.java:44)
   at org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.execute(FlowNodeActivityBehavior.java:36)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:40)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:63)
   at org.activiti.engine.impl.runtime.ExecutionEntity.performOperation(ExecutionEntity.java:496)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationProcessStartInitial.eventNotificationsCompleted(AtomicOperationProcessStartInitial.java:44)
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:52)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:63)
   at org.activiti.engine.impl.runtime.ExecutionEntity.performOperation(ExecutionEntity.java:496)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationProcessStart.eventNotificationsCompleted(AtomicOperationProcessStart.java:44)
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:52)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:63)
   at org.activiti.engine.impl.runtime.ExecutionEntity.performOperation(ExecutionEntity.java:496)
   at org.activiti.engine.impl.runtime.ExecutionEntity.start(ExecutionEntity.java:289)
   at org.activiti.engine.impl.cmd.SubmitStartFormCmd.execute(SubmitStartFormCmd.java:77)
   at org.activiti.engine.impl.cmd.SubmitStartFormCmd.execute(SubmitStartFormCmd.java:35)
   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.FormServiceImpl.submitStartFormData(FormServiceImpl.java:69)
   at ch.glue.egovrunner.explorer.ui.process.ProcessPresenter.submitStartForm(ProcessPresenter.java:93)
   at ch.glue.egovrunner.explorer.ui.form.FormWindowImpl$1.buttonClick(FormWindowImpl.java:56)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:490)
   … 35 more
Caused by: java.lang.ClassNotFoundException: org.activiti.engine.impl.persistence.entity.ExecutionEntity
   at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1518)
   at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1368)
   … 92 more
|#]

Can anybody tell me how to "deploy" my TaskListener so that my process can find it? Actually, I'm just deploying my war file on glassfish.

Best regards!

bhj2

Outcomes