no jBPM DB schema: no JBPM4_EXECUTION table. Run the create.jbpm.schema target
程序员文章站
2022-07-12 10:50:47
...
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngine' defined in class path resource [spring/applicationContext-db.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.jbpm.api.ProcessEngine org.jbpm.pvm.internal.processengine.SpringHelper.createProcessEngine()] threw exception; nested exception is org.jbpm.api.JbpmException: no jBPM DB schema: no JBPM4_EXECUTION table. Run the create.jbpm.schema target first in the install tool. Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.jbpm.api.ProcessEngine org.jbpm.pvm.internal.processengine.SpringHelper.createProcessEngine()] threw exception; nested exception is org.jbpm.api.JbpmException: no jBPM DB schema: no JBPM4_EXECUTION table. Run the create.jbpm.schema target first in the install tool. Caused by: org.jbpm.api.JbpmException: no jBPM DB schema: no JBPM4_EXECUTION table. Run the create.jbpm.schema target first in the install tool.
这个错是在jbpm和spring整合过程中出现的,现在将网上的一些和自己的解决方案进行总结
1、jbpm.hibernate.cfg.xml
<property name="current_session_context_class">thread</property>
这行配置不能写,不能从当前线程中获取session
2、mysql的数据库字符集和整理按照如下进行设置
3、hibernate与mysql连接的方言问题
hibernate与mysql5.5的设置应该是
<property name="dialect">
org.hibernate.dialect.MySQL5InnoDBDialect
</property>
这个网上说的,必须写上方言,但是我直接把方言注释了也没错