在JBPM 的src目录下面有
jbpm.cfg.xml
jbpm.hibernate.cfg.xml
jbpm.mail.properties
logging.properties
以上是4个默认配置文件。
在jbpm.hibernate.cfg.xml
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property> //里面的数据库方言会导致运行错误
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/test</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password">1234</property>
<property name="hibernate.hbm2ddl.auto">update</property>
<property name="hibernate.format_sql">true</property>
<mapping resource="jbpm.repository.hbm.xml" />
<mapping resource="jbpm.execution.hbm.xml" />
<mapping resource="jbpm.history.hbm.xml" />
<mapping resource="jbpm.task.hbm.xml" />
<mapping resource="jbpm.identity.hbm.xml" />
</session-factory>
</hibernate-configuration>
错误如下
no jBPM DB schema: no JBPM4_EXECUTION table. Run the create.jbpm.schema targ
JBPM没有操作数据库的权域,也就是说现在JBPM尚无权操作数据库
解决方法
如果你的MySql使用的是MySQLDialect 方言,该为MySQLInnoDBDialect试试 如果你的MySql使用的是MySQLInnoDBDialect 方言,请改为MySQLDialect试试