开发者社区> 问答> 正文

Activiti中TaskQueryImpl时不时报错,重启服务就好了,这个是什么问题?报错

Error querying database.  Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'limitBefore' in 'class org.activiti.engine.impl.TaskQueryImpl'

Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'limitBefore' in 'class org.activiti.engine.impl.TaskQueryImpl'

at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:107)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:98)
at org.activiti.engine.impl.db.DbSqlSession.selectListWithRawParameter(DbSqlSession.java:286)
at org.activiti.engine.impl.db.DbSqlSession.selectList(DbSqlSession.java:277)
at org.activiti.engine.impl.persistence.entity.TaskEntityManager.findTasksByQueryCriteria(TaskEntityManager.java:113)
at org.activiti.engine.impl.TaskQueryImpl.executeList(TaskQueryImpl.java:551)
at org.activiti.engine.impl.AbstractQuery.executeSingleResult(AbstractQuery.java:158)
at org.activiti.engine.impl.AbstractQuery.execute(AbstractQuery.java:141)
at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:57)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:37)
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35)
at org.activiti.engine.impl.AbstractQuery.singleResult(AbstractQuery.java:104)

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

    我也遇到了,怎么解决的????

    /*LicensedundertheApacheLicense,Version2.0(the"License");*youmaynotusethisfileexceptincompliancewiththeLicense.*YoumayobtainacopyoftheLicenseat**http://www.apache.org/licenses/LICENSE-2.0**Unlessrequiredbyapplicablelaworagreedtoinwriting,software*distributedundertheLicenseisdistributedonan"ASIS"BASIS,*WITHOUTWARRANTIESORCONDITIONSOFANYKIND,eitherexpressorimplied.*SeetheLicenseforthespecificlanguagegoverningpermissionsand*limitationsundertheLicense.*/packageorg.activiti.engine.impl.db;/***@authorDanielMeyer*/publicclassListQueryParameterObject{protectedintmaxResults=Integer.MAX_VALUE;protectedintfirstResult=0;protectedObjectparameter;protectedStringdatabaseType;publicListQueryParameterObject(){}publicListQueryParameterObject(Objectparameter,intfirstResult,intmaxResults){this.parameter=parameter;this.firstResult=firstResult;this.maxResults=maxResults;}publicintgetFirstResult(){returnfirstResult;}publicintgetFirstRow(){returnfirstResult+1;}publicintgetLastRow(){if(maxResults==Integer.MAX_VALUE){returnmaxResults;}returnfirstResult+maxResults+1;}publicintgetMaxResults(){returnmaxResults;}publicObjectgetParameter(){returnparameter;}publicvoidsetFirstResult(intfirstResult){this.firstResult=firstResult;}publicvoidsetMaxResults(intmaxResults){this.maxResults=maxResults;}publicvoidsetParameter(Objectparameter){this.parameter=parameter;}publicStringgetOrderBy(){//thedefaultordercolumnreturn"RES.ID_asc";}publicStringgetOrderByColumns(){returngetOrderBy();}publicvoidsetDatabaseType(StringdatabaseType){this.databaseType=databaseType;}publicStringgetDatabaseType(){returndatabaseType;}publicStringgetLimitBefore(){return"";}publicvoidsetLimitBefore(StringlimitBefore){}}

     

    再自己项目里创建一个上述的类,问题解决

    2020-06-14 15:01:59
    赞同 展开评论 打赏
问答地址:
问答排行榜
最热
最新

相关电子书

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