天天看点

flowable初始化建表失败:java.sql.SQLSyntaxErrorException: Table ‘flowable-test.act_id_user‘ doesn‘t exist……

springboot集成flowable时踩坑日记:java.sql.SQLSyntaxErrorException: Table ‘flowable-test.act_id_user’ doesn’t exist……

报错信息:

problem during schema upgrade, statement alter table ACT_ID_USER add TENANT_ID_ varchar(255) default ‘’

java.sql.SQLSyntaxErrorException: Table ‘flowable-test.act_id_user’ doesn’t exist

flowable初始化建表失败:java.sql.SQLSyntaxErrorException: Table ‘flowable-test.act_id_user‘ doesn‘t exist……

原因:

MySql:

springboot中的application.yml文件,在配置数据库连接时(url),需要在尾巴加上&nullCatalogMeansCurrent=true,默认是false。(这样做的主要目的,是能保证flowable自动建表成功)

如:

mysql5.x版本
url: jdbc:mysql://localhost:3306/flowable-test?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=UTC&nullCatalogMeansCurrent=true
mysql8版本:
 url: jdbc:mysql://localhost:3306/flowable-test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true
           

继续阅读