开发者社区> 问答> 正文

执行taskService.complete(taskId, variables?报错

我用的activiti 5.13,在执行一下语句的complete方法时报错:

  Map<String, Object> variables = new HashMap<String, Object>();
  variables.put("inputUser", "区县领导");
  taskService.complete(taskId, variables);

错误如下:

 Caused by: org.apache.ibatis.reflection.ReflectionException: There is no setter for property named 'byteArrayRef' in 'class org.activiti.engine.impl.persistence.entity.VariableInstanceEntity'
 at org.apache.ibatis.reflection.Reflector.getSetInvoker(Reflector.java:300)
 at org.apache.ibatis.reflection.MetaClass.getSetInvoker(MetaClass.java:97)

希望各位高手给予解答!

展开
收起
爱吃鱼的程序员 2020-06-12 14:18:48 2071 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    出现的详细错误如下:

    ###Cause:org.apache.ibatis.reflection.ReflectionException:Couldnotsetproperty'byteArrayRef'of'VariableInstanceEntity[id=307,name=objId,type=string]'withvalue'ByteArrayRef[id=null,name=null,entity=null]'Cause:org.apache.ibatis.reflection.ReflectionException:Thereisnosetterforpropertynamed'byteArrayRef'in'classorg.activiti.engine.impl.persistence.entity.VariableInstanceEntity'
     atorg.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:8)
     atorg.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:61)
     atorg.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:53)
     atorg.activiti.engine.impl.db.DbSqlSession.selectListWithRawParameter(DbSqlSession.java:284)
     atorg.activiti.engine.impl.db.DbSqlSession.selectList(DbSqlSession.java:275)
     atorg.activiti.engine.impl.db.DbSqlSession.selectList(DbSqlSession.java:270)
     atorg.activiti.engine.impl.db.DbSqlSession.selectList(DbSqlSession.java:251)
     atorg.activiti.engine.impl.persistence.entity.VariableInstanceEntityManager.findVariableInstancesByExecutionId(VariableInstanceEntityManager.java:34)
     atorg.activiti.engine.impl.persistence.entity.ExecutionEntity.loadVariableInstances(ExecutionEntity.java:997)
     atorg.activiti.engine.impl.persistence.entity.VariableScopeImpl.ensureVariableInstancesInitialized(VariableScopeImpl.java:60)
     atorg.activiti.engine.impl.persistence.entity.VariableScopeImpl.hasVariableLocal(VariableScopeImpl.java:134)
     atorg.activiti.engine.impl.persistence.entity.VariableScopeImpl.setVariable(VariableScopeImpl.java:243)
     atorg.activiti.engine.impl.persistence.entity.VariableScopeImpl.setVariable(VariableScopeImpl.java:239)
     atorg.activiti.engine.impl.persistence.entity.VariableScopeImpl.setVariables(VariableScopeImpl.java:179)
     atorg.activiti.engine.impl.persistence.entity.TaskEntity.setExecutionVariables(TaskEntity.java:378)
     atorg.activiti.engine.impl.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:36)
     atorg.activiti.engine.impl.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:24)
     atorg.activiti.engine.impl.cmd.NeedsActiveTaskCmd.execute(NeedsActiveTaskCmd.java:61)
     atorg.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
     atorg.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:61)
     atorg.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)
     atorg.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:131)
     atorg.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)
     atorg.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
     atorg.activiti.engine.impl.TaskServiceImpl.complete(TaskServiceImpl.java:167)
     atbizfuse.restful.svc.WorkflowService.completeMyPersonalTask(WorkflowService.java:139)
     atcn.lds.web.TestWorkFlowService.testCompleteMyPersonalTask(TestWorkFlowService.java:136)
     atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)
     atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     atjava.lang.reflect.Method.invoke(Method.java:597)
     atorg.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)
     atorg.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
     atorg.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
     atorg.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745)
     atorg.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:686)
     atorg.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
     atorg.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
     atorg.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
     atorg.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953)
     ...100more
    Causedby:org.apache.ibatis.reflection.ReflectionException:Couldnotsetproperty'byteArrayRef'of'VariableInstanceEntity[id=307,name=objId,type=string]'withvalue'ByteArrayRef[id=null,name=null,entity=null]'Cause:org.apache.ibatis.reflection.ReflectionException:Thereisnosetterforpropertynamed'byteArrayRef'in'classorg.activiti.engine.impl.persistence.entity.VariableInstanceEntity'
     atorg.apache.ibatis.reflection.wrapper.BeanWrapper.setBeanProperty(BeanWrapper.java:154)
     atorg.apache.ibatis.reflection.wrapper.BeanWrapper.set(BeanWrapper.java:36)
     atorg.apache.ibatis.reflection.MetaObject.setValue(MetaObject.java:120)
     atorg.apache.ibatis.executor.resultset.FastResultSetHandler.applyPropertyMappings(FastResultSetHandler.java:228)
     atorg.apache.ibatis.executor.resultset.FastResultSetHandler.getRowValue(FastResultSetHandler.java:200)
     atorg.apache.ibatis.executor.resultset.FastResultSetHandler.handleRowValues(FastResultSetHandler.java:149)
     atorg.apache.ibatis.executor.resultset.FastResultSetHandler.handleResultSet(FastResultSetHandler.java:125)
     atorg.apache.ibatis.executor.resultset.FastResultSetHandler.handleResultSets(FastResultSetHandler.java:102)
     atorg.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:40)
     atorg.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:55)
     atorg.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:41)
     atorg.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:94)
     atorg.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:72)
     atorg.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:59)
     ...138more
    Causedby:org.apache.ibatis.reflection.ReflectionException:Thereisnosetterforpropertynamed'byteArrayRef'in'classorg.activiti.engine.impl.persistence.entity.VariableInstanceEntity'
     atorg.apache.ibatis.reflection.Reflector.getSetInvoker(Reflector.java:300)
     atorg.apache.ibatis.reflection.MetaClass.getSetInvoker(MetaClass.java:97)
     atorg.apache.ibatis.reflection.wrapper.BeanWrapper.setBeanProperty(BeanWrapper.java:146)
     ...151more

     

    http://forums.activiti.org/content/error-occured-when-completing-tasks 看看这个是不是jar冲突了 报错的地方是 ibatis,和activiti没关系
    2020-06-12 15:08:51
    赞同 展开评论 打赏
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载