When learning the activiti process engine, integrating activiti with springboot can automatically deploy the process flow, but mine keeps reporting an error:
Error querying database. Cause: java.sql.SQLSyntaxErrorException: Table'actspring.act_ge_property'.
At this time, restart Dafa also It’s not easy to use. I watched the tutorial again and it didn’t make any difference. Later, Baidu had the error and found a post saying that it was because of the MySQL version. The problem will occur after MySQL version 8.xxx. I took a look at mine. There is no version number written in the pom.xml file. I saw that the imported package defaults to version 8.xxx, which is changed to version 5.1.6. The error is resolved
Because mysql uses the schema to identify the library name instead of catalog, mysql scans all libraries to find tables. If there are tables with the same name in other libraries, activiti thinks it has found it. In essence, this table does not exist in the current database.
nullCatalogMeansCurrent=true means that mysql defaults to the current database operation. In
mysql-connector-java 5.xxx this parameter defaults to
true, and above
6.xxx defaults to
false, so you need to set
Add when configuring mysql connection:
properties:<br>useUnicode=true&characterEncoding=utf8 &nullCatalogMeansCurrent=true&useSSL=false&useLegacyDatetimeCode=false&serverTimezone=UTC <br>xml: ?useUnicode=true&characterEncoding=utf8&nullCatalogMeansCurrent=true&useSSL=false&useLegacyDatetimeCode=false&serverTimezone=UTC