整合Activiti异常:Cause: java.sql.SQLSyntaxErrorException: Table 'myactiviti.act_ge_property' doesn't exist

起因

升级旧SSM项目时,使用SpringBoot整合Activiti5时,报错

原因

因为mysql使用schema标识库名而不是catalog,因此mysql会扫描所有的库来找表,如果其他库中有相同名称的表,activiti就以为找到了,本质上这个表在当前数据库中并不存在。
设置nullCatalogMeansCurrent=true,表示mysql默认当前数据库操作
在mysql-connector-java 5.xxx该参数默认为true,在6.xxx以上默认为false,因此需要设置nullCatalogMeansCurrent=true。

解决方案

mysql链接后追加:nullCatalogMeansCurrent=true

参考文章
解决报错:Cause: java.sql.SQLSyntaxErrorException: Table 'myactiviti.act_ge_property' doesn't exist

posted @ 2021-02-17 21:18  lifelikeplay  阅读(1320)  评论(0编辑  收藏  举报