Activiti流创建数据表的过程中报错 java.sql.SQLSyntaxErrorException: Table ‘activiti.act_ge_property’ doesn’t exist
启动引擎
ProcessEngine processEngine= ProcessEngines.getDefaultProcessEngine();
System.out.println(processEngine);
解决方法(数据库连接添加如下代码)
nullCatalogMeansCurrent=true
####示例
jdbc:mysql://localhost:3306/activiti?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true"
总结
mysql使用schema标识库名而不是catalog,因此mysql会扫描所有的库来找表,如果其他库中有相同名称的表,activiti就以为找到了,本质上这个表在当前数据库中并不存在。
设置nullCatalogMeansCurrent=true,表示mysql默认当前数据库操作,在mysql-connector-java 5.xxx该参数默认为true,在6.xxx以上默认为false,因此需要设置:nullCatalogMeansCurrent=true