侧边栏壁纸
  • 累计撰写 2,058 篇文章
  • 累计创建 73 个标签
  • 累计收到 20 条评论

目 录CONTENT

文章目录

Activiti报错:Caused by java.sql.SQLSyntaxErrorException Table 'study_activiti.act_ge_property' doesn't exist

大猿本猿
2022-01-03 / 1,217 阅读 / 0 字

1、问题描述

Activiti启动初始化报错:

Caused by: java.sql.SQLSyntaxErrorException: Table 'study_activiti.act_ge_property' doesn't exist

image

2、问题原因

出现这种问题的原因是mysql版本问题,mysql8.xxx以上驱动会出现这个问题,我的mysql配置,是8.0.26的。

image

因为mysql使用schema标识库名而不是catalog,因此mysql会扫描所有的库来找表,如果其他库中有相同名称的表,activiti就以为找到了,本质上这个表在当前数据库中并不存在。

设置nullCatalogMeansCurrent=true,表示mysql默认当前数据库操作,在mysql-connector-java 5.xxx该参数默认为true,在6.xxx以上默认为false,因此需要设置nullCatalogMeansCurrent=true。

3、解决方案

设置nullCatalogMeansCurrent=true

image