JBPM4 使用MYSQL作为后端,执行结束流程报错。
首先,分析配置文件hibernate.cfg.xml的内容,其中在默认设置是用 HSQL(开源的数据库),这是一个内存数据库,这种内存数据库用来代替项目实际所用的数据库来做单元测试挺不错的。不过在我们的真实开发中,还是使用oracle等。
MySQL 的更改如下:
<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/onlineas</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password">123456</property>
运行junit测试,抛异常
07:48:16,655 INF | [DefaultCommandService] exception while executing command org.jbpm.pvm.internal.cmd.DeleteDeploymentCmd@8a2023
org.hibernate.exception.ConstraintViolationException: could not delete: [org.jbpm.pvm.internal.model.ExecutionImpl#10]
....
Caused by: com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`onlineas/jbpm4_execution`, CONSTRAINT `FK_EXEC_INSTANCE` FOREIGN KEY (`INSTANCE_`) REFERENCES `jbpm4_execution` (`DBID_`))
解决办法:修改dialect即可,<property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
2022年9月15日 23:13
History can guide learners to see trends and processes from a broader, holistic perspective and to understand them. Through History, they come into contact with other cultures and societies and in this way they gain a more holistic understanding of the contemporary world and their place in this broader context. Telugu Medium, AP SSC History Model Paper English Medium & Urdu Medium Students of the State Board can download the AP 10th History Model Paper 2023 Pdf with Answers designed based on the revised syllabus and curriculum of the course. Class teachers and leading institutional experts are designed and suggested the Part-A, Part-B, Part-C, and Part-D exams like SA-1, SA-2, FA-1, FA-2, FA-3, FA-4 along with Assignments.
2023年11月18日 16:23
I've encountered a similar MYSQL error while using JBPM4. Has anyone found a reliable solution to address this issue during the end process execution?
2024年7月22日 20:55
When utilizing MySQL as the backend, experiencing issues after the process can be extremely frustrating. It is critical to troubleshoot typical difficulties such as database connection problems or query syntax mistakes. Ensuring that your MySQL configuration is optimal and checking for any conflicts will help you address these problems. Consider seeking expert assistance if you are having comparable issues while working on your dissertation. Services such as the <a href="https://dissertationwritinghelp.uk/">best dissertation writing service uk.</a> provide skilled assistance to guarantee that your dissertation process goes smoothly.