Caused by: org.jbpm.api.JbpmException: resource classpath:jdpm/jbpm.cfg.xml does not exist
来源:互联网 发布:暗黑战神源码解读 编辑:程序博客网 时间:2024/06/08 21:34
2017-09-01 13:45:34,708 [localhost-startStop-1] ERROR [org.springframework.web.context.ContextLoader] - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngine' defined in class path resource [jdpm/applicationContext.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: resource classpath:jdpm/jbpm.cfg.xml does not exist at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:591) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1094) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:989) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:700) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4994) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5492) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)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: resource classpath:jdpm/jbpm.cfg.xml does not exist at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:188) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:580) ... 23 moreCaused by: org.jbpm.api.JbpmException: resource classpath:jdpm/jbpm.cfg.xml does not exist at org.jbpm.pvm.internal.stream.ResourceStreamInput.openStream(ResourceStreamInput.java:60) at org.jbpm.pvm.internal.xml.Parse.getInputSource(Parse.java:146) at org.jbpm.pvm.internal.xml.Parser.buildDocument(Parser.java:453) at org.jbpm.pvm.internal.xml.Parser.execute(Parser.java:425) at org.jbpm.pvm.internal.xml.Parse.execute(Parse.java:158) at org.jbpm.pvm.internal.cfg.ConfigurationImpl.parse(ConfigurationImpl.java:137) at org.jbpm.pvm.internal.cfg.ConfigurationImpl.setResource(ConfigurationImpl.java:116) at org.jbpm.pvm.internal.processengine.SpringHelper.createProcessEngine(SpringHelper.java:50) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:166) ... 24 more
配置
将这个文件放到src下,并且去掉classpath: 就解决了
原因是jbpm里面写死了,源码如下
public class SpringHelper implements ApplicationContextAware, DisposableBean { protected ApplicationContext applicationContext; protected String jbpmCfg = "jbpm.cfg.xml"; protected ProcessEngine processEngine; public void setJbpmCfg(String jbpmCfg) { this.jbpmCfg = jbpmCfg; } public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { this.applicationContext = applicationContext; } public ProcessEngine createProcessEngine() { processEngine = new ConfigurationImpl() .springInitiated(applicationContext) .setResource(jbpmCfg) .buildProcessEngine(); return processEngine; } /** * close process engine when spring close/refresh ctx. */ public void destroy() throws Exception { if (processEngine != null) { processEngine.close(); processEngine = null; } }
阅读全文
0 0
- Caused by: org.jbpm.api.JbpmException: resource classpath:jdpm/jbpm.cfg.xml does not exist
- Caused by: org.jbpm.api.JbpmException: resource jbpm.cfg.xml does not exist
- org.jbpm.api.JbpmException
- org.jbpm.api.JbpmException: no process definition with id 'test1'
- org.jbpm.api.JbpmException: no process definition with key '***'
- org.jbpm.api.JbpmException: no environment to get org.jbpm.pvm.internal.session.RepositorySession
- org.jbpm.api.JbpmException: no jBPM DB schema: no JBPM4_EXECUTION table
- 配置jbpm环境时,出现org.hibernate.MappingNotFoundException: resource: jbpm.repository.hbm.xml not found
- 简单请假流程中的错误!org.jbpm.api.JbpmException: execution is not in a activity or in a transition
- jbpm.cfg.xml配置
- jbpm.hibernate.cfg.xml
- org.jbpm.api.JbpmException: no org.springframework.transaction.PlatformTransactionManager in current
- jbpm4.4+Spring集成出现错误org.hibernate.HibernateException: jbpm.hibernate.cfg.xml not found
- jbpm4.4+Spring集成出现错误org.hibernate.HibernateException: jbpm.hibernate.cfg.xml not found
- Caused by: org.postgresql.util.PSQLException: ERROR: relation "item" does not exist
- [Tomcat] classpath resource [hbm.xml] cannot be opened because it does not exist
- org.jbpm.api.JbpmException: No unnamed transitions were found for the task '?????'
- Resource '/servers' does not exist
- 苹果电脑获取Android Studio的发布版SHA1和开发版SHA1
- Android如何实现微信支付
- 多线程造成死锁的两种情况
- C++中static
- Android---Intent的介绍
- Caused by: org.jbpm.api.JbpmException: resource classpath:jdpm/jbpm.cfg.xml does not exist
- javaweb的request获取真实IP地址
- 代码整洁之道--函数
- [公告] 2017年9月装机员系统更新
- 通过H5的新标签canvas做出一个时钟的全过程,希望对初学者有帮助
- HDU 3072 Intelligence System(Tarjan+最小树形图)
- Validation failed for one or more entities. See 'EntityValidationErrors' property for more details.
- GVIM win7添加到右键菜单方法
- Python 科学计算之实验环境安装及使用