项目集成Activiti5.17 MyBatis3.2.5 Spring3.2 hibernate4.2 几个类库, 启用activiti的默认查询任务时, 会出现:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order by RES.CREATE_TIME_ asc
LIMIT 10 OFFSET 0' at line 30
### The error may exist in org/activiti/db/mapping/entity/Task.xml
### The error may involve org.activiti.engine.impl.persistence.entity.TaskEntity.selectTaskByQueryCriteria-Inline
### The error occurred while setting parameters
### SQL: select distinct RES.* from ACT_RU_TASK RES left join ACT_RU_IDENTITYLINK I on I.TASK_ID_ = RES.ID_ WHERE RES.SUSPENSION_STATE_ = 1 and (RES.ASSIGNEE_ = ? or (RES.ASSIGNEE_ is null and (I.USER_ID_ = ? or I.GROUP_ID_ IN (select g.GROUP_ID_ from ACT_ID_MEMBERSHIP g where g.USER_ID_ = ? ) ) ) ) order by order by RES.CREATE_TIME_ asc LIMIT ? OFFSET ?
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order by RES.CREATE_TIME_ asc
LIMIT 10 OFFSET 0' at line 30。
注意红色部分, 生成了两个order by 关键字。求大神解答, 在线等。
补充说明:
1、我单独使用activiti5+spring集成测试是没有问题的, 都正常。引入公司数据持久化的项目(mybatis+hibernate)后, 就出现了这个问题。
2、出现这个问题不稳定, 时好时坏。
3、求大神解答, 求大神解答, 求大神解答!
这个bug是由于mybatis版本高了引起的,我遇到过。
mybatis-3.2.8.jar就行 mybatis-3.3.0.jar就不行了
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。