一次使用SSH和Activiti6开发的项目中,在服务器启动的时候就报错:
org.apache.ibatis.exceptions.PersistenceException:
### 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
查找表不存在?Activiti没有自动建表?
可配置文件确实将databaseSchemaUpdate属性设置为了true,这意味着activiti会执行无表创建,有表更新的策略
<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
<property name="dataSource" ref="pooledDataSource" />
<property name="transactionManager" ref="transactionManager" />
<property name="databaseSchema" value="roomRent" />
<property name="databaseSchemaUpdate" value="true" />
<property name="asyncExecutorActivate" value="false" />
</bean>
但执行显示并没有起效。网上也没有靠谱的结果。。
<