问题
### Error querying database. Cause: java.sql.SQLSyntaxErrorException: Table 'activiti.act_ge_property' doesn't exist
### The error may exist in org/activiti/db/mapping/entity/Property.xml
### The error may involve org.activiti.engine.impl.persistence.entity.PropertyEntityImpl.selectProperty-Inline
### The error occurred while setting parameters
### SQL: select * from ACT_GE_PROPERTY where NAME_ = ?
### Cause: java.sql.SQLSyntaxErrorException: Table 'activiti.act_ge_property' doesn't exist
代码
@Test
public void createTable ( ) {
ProcessEngineConfiguration configuration = ProcessEngineConfiguration. createStandaloneProcessEngineConfiguration ( ) ;
configuration. setJdbcDriver ( "com.mysql.cj.jdbc.Driver" ) ;
configuration. setJdbcUrl ( "jdbc:mysql://localhost:3306/activiti?characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false" ) ;
configuration. setJdbcUsername ( "root" ) ;
configuration. setJdbcPassword ( "123456" ) ;
configuration. setDatabaseSchemaUpdate ( ProcessEngineConfiguration. DB_SCHEMA_UPDATE_TRUE) ;
ProcessEngine processEngine = configuration. buildProcessEngine ( ) ;
System. out. println ( processEngine) ;
}
解决方案
< dependency>
< groupId> mysql</ groupId>
< artifactId> mysql-connector-java</ artifactId>
< version> 5.1.41</ version>
</ dependency>
修改驱动 com.mysql.jdbc.Driver
参考文章
Activiti工作流引擎使用详解(一)
activiti的坑