spring - Exception while executing service task in activiti,activiti engine Not able to locate class -


i developing web project using spring mvc , activiti worked fine simple user tasks, when workflow reaches service task in java method called exception thrown. project running on eclipse using tomcat7 server.

org.activiti.engine.activitiillegalargumentexception: delegate expression com.nuc.service.doservice did neither resolve implementation of interface org.activiti.engine.impl.pvm.delegate.activitybehavior nor interface org.activiti.engine.delegate.javadelegate @ org.activiti.engine.impl.bpmn.behavior.servicetaskdelegateexpressionactivitybehavior.execute(servicetaskdelegateexpressionactivitybehavior.java:81) @ org.activiti.engine.impl.pvm.runtime.atomicoperationactivityexecute.execute(atomicoperationactivityexecute.java:45) @ org.activiti.engine.impl.interceptor.commandcontext.performoperation(commandcontext.java:88) @ org.activiti.engine.impl.persistence.entity.executionentity.performoperationsync(executionentity.java:532) @ org.activiti.engine.impl.persistence.entity.executionentity.performoperation(executionentity.java:527) @ org.activiti.engine.impl.pvm.runtime.atomicoperationtransitionnotifylistenerstart.eventnotificationscompleted(atomicoperationtransitionnotifylistenerstart.java:52) @ org.activiti.engine.impl.pvm.runtime.abstracteventatomicoperation.execute(abstracteventatomicoperation.java:56) @ org.activiti.engine.impl.interceptor.commandcontext.performoperation(commandcontext.java:88) @ org.activiti.engine.impl.persistence.entity.executionentity.performoperationsync(executionentity.java:532) @ org.activiti.engine.impl.persistence.entity.executionentity.performoperation(executionentity.java:527) @ org.activiti.engine.impl.pvm.runtime.abstracteventatomicoperation.execute(abstracteventatomicoperation.java:49) @ org.activiti.engine.impl.interceptor.commandcontext.performoperation(commandcontext.java:88) @ org.activiti.engine.impl.persistence.entity.executionentity.performoperationsync(executionentity.java:532) @ org.activiti.engine.impl.persistence.entity.executionentity.performoperation(executionentity.java:527) @ org.activiti.engine.impl.pvm.runtime.atomicoperationtransitioncreatescope.execute(atomicoperationtransitioncreatescope.java:49) @ org.activiti.engine.impl.interceptor.commandcontext.performoperation(commandcontext.java:88) @ org.activiti.engine.impl.persistence.entity.executionentity.performoperationsync(executionentity.java:532) @ org.activiti.engine.impl.persistence.entity.executionentity.performoperation(executionentity.java:527) @ org.activiti.engine.impl.pvm.runtime.atomicoperationtransitionnotifylistenertake.execute(atomicoperationtransitionnotifylistenertake.java:66) @ org.activiti.engine.impl.interceptor.commandcontext.performoperation(commandcontext.java:88) @ org.activiti.engine.impl.persistence.entity.executionentity.performoperationsync(executionentity.java:532) @ org.activiti.engine.impl.persistence.entity.executionentity.performoperation(executionentity.java:527) @ org.activiti.engine.impl.pvm.runtime.atomicoperationtransitiondestroyscope.execute(atomicoperationtransitiondestroyscope.java:116) @ org.activiti.engine.impl.interceptor.commandcontext.performoperation(commandcontext.java:88) @ org.activiti.engine.impl.persistence.entity.executionentity.performoperationsync(executionentity.java:532) @ org.activiti.engine.impl.persistence.entity.executionentity.performoperation(executionentity.java:527) @ org.activiti.engine.impl.pvm.runtime.atomicoperationtransitionnotifylistenerend.eventnotificationscompleted(atomicoperationtransitionnotifylistenerend.java:36) @ org.activiti.engine.impl.pvm.runtime.abstracteventatomicoperation.execute(abstracteventatomicoperation.java:56) @ org.activiti.engine.impl.interceptor.commandcontext.performoperation(commandcontext.java:88) @ org.activiti.engine.impl.persistence.entity.executionentity.performoperationsync(executionentity.java:532) @ org.activiti.engine.impl.persistence.entity.executionentity.performoperation(executionentity.java:527) @ org.activiti.engine.impl.pvm.runtime.abstracteventatomicoperation.execute(abstracteventatomicoperation.java:49) @ org.activiti.engine.impl.interceptor.commandcontext.performoperation(commandcontext.java:88) @ org.activiti.engine.impl.persistence.entity.executionentity.performoperationsync(executionentity.java:532) @ org.activiti.engine.impl.persistence.entity.executionentity.performoperation(executionentity.java:527) @ org.activiti.engine.impl.persistence.entity.executionentity.take(executionentity.java:367) @ org.activiti.engine.impl.bpmn.behavior.bpmnactivitybehavior.performoutgoingbehavior(bpmnactivitybehavior.java:105) @ org.activiti.engine.impl.bpmn.behavior.bpmnactivitybehavior.performdefaultoutgoingbehavior(bpmnactivitybehavior.java:54) @ org.activiti.engine.impl.bpmn.behavior.flownodeactivitybehavior.leave(flownodeactivitybehavior.java:44) @ org.activiti.engine.impl.bpmn.behavior.abstractbpmnactivitybehavior.leave(abstractbpmnactivitybehavior.java:47) @ org.activiti.engine.impl.bpmn.behavior.usertaskactivitybehavior.signal(usertaskactivitybehavior.java:96) @ org.activiti.engine.impl.persistence.entity.executionentity.signal(executionentity.java:350) @ org.activiti.engine.impl.persistence.entity.taskentity.complete(taskentity.java:160) @ org.activiti.engine.impl.cmd.completetaskcmd.execute(completetaskcmd.java:39) @ org.activiti.engine.impl.cmd.completetaskcmd.execute(completetaskcmd.java:24) @ org.activiti.engine.impl.cmd.needsactivetaskcmd.execute(needsactivetaskcmd.java:61) @ org.activiti.engine.impl.interceptor.commandinvoker.execute(commandinvoker.java:24) @ org.activiti.engine.impl.interceptor.commandcontextinterceptor.execute(commandcontextinterceptor.java:57) @ org.activiti.spring.springtransactioninterceptor$1.dointransaction(springtransactioninterceptor.java:47) @ org.springframework.transaction.support.transactiontemplate.execute(transactiontemplate.java:133) @ org.activiti.spring.springtransactioninterceptor.execute(springtransactioninterceptor.java:45) @ org.activiti.engine.impl.interceptor.loginterceptor.execute(loginterceptor.java:31) @ org.activiti.engine.impl.cfg.commandexecutorimpl.execute(commandexecutorimpl.java:40) @ org.activiti.engine.impl.cfg.commandexecutorimpl.execute(commandexecutorimpl.java:35) @ org.activiti.engine.impl.taskserviceimpl.complete(taskserviceimpl.java:168) @ com.gk.controller.mycontroller.complete(mycontroller.java:101) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:497) @ org.springframework.web.method.support.invocablehandlermethod.invoke(invocablehandlermethod.java:215) @ org.springframework.web.method.support.invocablehandlermethod.invokeforrequest(invocablehandlermethod.java:132) @ org.springframework.web.servlet.mvc.method.annotation.servletinvocablehandlermethod.invokeandhandle(servletinvocablehandlermethod.java:104) @ org.springframework.web.servlet.mvc.method.annotation.requestmappinghandleradapter.invokehandlemethod(requestmappinghandleradapter.java:749) @ org.springframework.web.servlet.mvc.method.annotation.requestmappinghandleradapter.handleinternal(requestmappinghandleradapter.java:689) @ org.springframework.web.servlet.mvc.method.abstracthandlermethodadapter.handle(abstracthandlermethodadapter.java:83) @ org.springframework.web.servlet.dispatcherservlet.dodispatch(dispatcherservlet.java:938) @ org.springframework.web.servlet.dispatcherservlet.doservice(dispatcherservlet.java:870) @ org.springframework.web.servlet.frameworkservlet.processrequest(frameworkservlet.java:961) @ org.springframework.web.servlet.frameworkservlet.doget(frameworkservlet.java:852) @ javax.servlet.http.httpservlet.service(httpservlet.java:620) @ org.springframework.web.servlet.frameworkservlet.service(frameworkservlet.java:837) @ javax.servlet.http.httpservlet.service(httpservlet.java:727) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:303) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:208) @ org.apache.catalina.core.standardwrappervalve.invoke(standardwrappervalve.java:220) @ org.apache.catalina.core.standardcontextvalve.invoke(standardcontextvalve.java:122) @ org.apache.catalina.authenticator.authenticatorbase.invoke(authenticatorbase.java:501) @ org.apache.catalina.core.standardhostvalve.invoke(standardhostvalve.java:170) @ org.apache.catalina.valves.errorreportvalve.invoke(errorreportvalve.java:98) @ org.apache.catalina.valves.accesslogvalve.invoke(accesslogvalve.java:950) @ org.apache.catalina.core.standardenginevalve.invoke(standardenginevalve.java:116) @ org.apache.catalina.connector.coyoteadapter.service(coyoteadapter.java:408) @ org.apache.coyote.http11.abstracthttp11processor.process(abstracthttp11processor.java:1041) @ org.apache.coyote.abstractprotocol$abstractconnectionhandler.process(abstractprotocol.java:607) @ org.apache.tomcat.util.net.jioendpoint$socketprocessor.run(jioendpoint.java:315) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1142) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:617) @ java.lang.thread.run(thread.java:745) 

bpmn xml

 <process id="myprocess" name="my process" isexecutable="true"> <startevent id="startevent1" name="start"></startevent> <usertask id="usertask1" name="add new record" activiti:candidateusers="user1" activiti:candidategroups="m"></usertask> <sequenceflow id="flow1" sourceref="startevent1" targetref="usertask1"></sequenceflow> <usertask id="usertask2" name="approve record" activiti:candidateusers="user2" activiti:candidategroups="c"></usertask> <sequenceflow id="flow2" sourceref="usertask1" targetref="usertask2"></sequenceflow> <servicetask id="servicetask1" name="service task" activiti:delegateexpression="com.nuc.service.doservice"></servicetask> <endevent id="endevent1" name="end"></endevent> <sequenceflow id="flow3" sourceref="servicetask1" targetref="endevent1"></sequenceflow> <sequenceflow id="flow4" sourceref="usertask2" targetref="servicetask1"></sequenceflow> 

beans.xml

    <bean id="doservice" class="com.nuc.service.doservice"> </bean>  <bean id="datasource" class="com.mysql.jdbc.jdbc2.optional.mysqldatasource">     <property name="url" value="jdbc:mysql://127.0.0.1/activitidb" />     <property name="user" value="root" />     <property name="password" value="password" />  </bean> <bean id="transactionmanager"     class="org.springframework.jdbc.datasource.datasourcetransactionmanager">     <property name="datasource" ref="datasource" /> </bean>   <bean id="processengineconfiguration" class="org.activiti.spring.springprocessengineconfiguration">      <property name="datasource" ref="datasource" />     <property name="transactionmanager" ref="transactionmanager" />     <property name="databaseschemaupdate" value="false" />     <property name="jobexecutoractivate" value="false" />  </bean>  <bean id="processengine" class="org.activiti.spring.processenginefactorybean">     <property name="processengineconfiguration" ref="processengineconfiguration" /> </bean> <bean id="repositoryservice" factory-bean="processengine"     factory-method="getrepositoryservice" /> <bean id="runtimeservice" factory-bean="processengine"     factory-method="getruntimeservice" /> <bean id="taskservice" factory-bean="processengine"     factory-method="gettaskservice" /> <bean id="historyservice" factory-bean="processengine"     factory-method="gethistoryservice" /> <bean id="managementservice" factory-bean="processengine"     factory-method="getmanagementservice" /> 

doservice

import org.activiti.engine.delegate.delegateexecution; import org.activiti.engine.delegate.javadelegate; import org.activiti.engine.impl.pvm.delegate.activityexecution; import org.springframework.stereotype.service;   @service public class doservice implements javadelegate{  public void execute(delegateexecution arg0) throws exception {     // todo auto-generated method stub     system.out.println("service task"); }   } 

are sure class com.nuc.service.doservice implement either org.activiti.engine.delegate.javadelegate or org.activiti.engine.impl.pvm.delegate.activitybehavior?


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -