jbpm4.4+Spring集成出现错误org.hibernate.HibernateException: jbpm.hibernate.cfg.xml not found
来源:互联网 发布:国外社交软件app 编辑:程序博客网 时间:2024/04/25 20:15
jbpm4.4+SSH框架集成时出现如下错误:
Caused by: org.hibernate.HibernateException: jbpm.hibernate.cfg.xml not found
at org.hibernate.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:170)
at org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:1439)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1461)
at org.jbpm.pvm.internal.wire.descriptor.HibernateConfigurationDescriptor$AddCfgResource.apply(HibernateConfigurationDescriptor.java:149)
at org.jbpm.pvm.internal.wire.descriptor.HibernateConfigurationDescriptor.apply(HibernateConfigurationDescriptor.java:89)
at org.jbpm.pvm.internal.wire.descriptor.HibernateConfigurationDescriptor.initialize(HibernateConfigurationDescriptor.java:75)
at org.jbpm.pvm.internal.wire.WireContext.performInitialization(WireContext.java:551)
at org.jbpm.pvm.internal.wire.WireContext.initialize(WireContext.java:513)
at org.jbpm.pvm.internal.wire.WireContext.create(WireContext.java:467)
at org.jbpm.pvm.internal.wire.WireContext.create(WireContext.java:455)
at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:429)
at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:339)
原因是:jbpm4.4默认的hibernate事务管理配置jbpm.tx.hibernate.cfg.xml,根据该配置,工作流引擎将会使用默认的配置文件jbpm.hibernate.cfg.xml (配置文件在jbpm.jar包下)。在将JBPM集成到Spring时,要使用Spring配置文件applicationContext.xml中的事务管理器,因此需要在jbpm.cfg.xml中将:
<import resource="jbpm.tx.hibernate.cfg.xml" />
替换为
<import resource="jbpm.tx.spring.cfg.xml" />
替换之后会使用默认Spring配置文件applicationContext.xml。
如果需要为jbpm4指定其他Spring配置文件,在jbpm.cfg.xml中作如下配置,例如使用applicationContext2.xml中的事务管理器:
<jbpm-configuration>
<process-engine-context>
<string name="spring.cfg" value="applicationContext2.xml" />
</process-engine-context>
......
</jbpm-configuration>
- jbpm4.4+Spring集成出现错误org.hibernate.HibernateException: jbpm.hibernate.cfg.xml not found
- jbpm4.4+Spring集成出现错误org.hibernate.HibernateException: jbpm.hibernate.cfg.xml not found
- Maven项目总是出现org.hibernate.HibernateException: /hibernate.cfg.xml not found错误的解决方法
- org.hibernate.HibernateException: /hibernate.cfg.xml not found
- org.hibernate.HibernateException: /hibernate.cfg.xml not found
- org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml
- 【报错】HibernateException:hibernate.cfg.xml not found
- hibernate异常——org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml
- 配置jbpm环境时,出现org.hibernate.MappingNotFoundException: resource: jbpm.repository.hbm.xml not found
- 异常:org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml
- org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml的问题
- jbpm.hibernate.cfg.xml
- 【J2EE】/hibernate.cfg.xml not found
- 异常:/hibernate.cfg.xml not found
- 异常:/hibernate.cfg.xml not found
- 关于org.hibernate.HibernateException: Dialect class not found: org.hibernate.dialect.MYSQL5Dialect
- Spring-Flex与Hibernate 4集成出现错误 ,java.lang.ClassNotFoundException: org.hibernate.collection.Persisten
- 使用hibernate出现could not parse configuration:hibernate.cfg.xml 错误的解决办法
- js中if条件的真假
- 数据库授权操作
- SwitchHosts高效切换host -- 让开发,测试,线上环境切换更容易
- 设计模式学习-工厂模式/桥接模式
- RelativeLayout 常用属性介绍
- jbpm4.4+Spring集成出现错误org.hibernate.HibernateException: jbpm.hibernate.cfg.xml not found
- 下拉菜单包含搜索框-searchableSelect
- LeetCode题解-237-Delete Node in a Linked List
- JAVA 本地打印 DocFlavor、DocPrintJob job、PrintService
- mysql-模糊查找数据库和查看数据库的创建语句
- linux设置系统环境变量
- 好的网站运营,就该给用户想要的!关键是怎么给
- 字符串的 宽高计算
- redis常用命令