JBPM java.lang.UnsupportedOperationException: The user must supply a JDBC connection

 

  
  
  
  
  1. 11:44:45,718 ERROR HibernateSessionResource:42 - hibernate transaction begin failed.  closing hibernate session  
  2. java.lang.UnsupportedOperationException: The user must supply a JDBC connection  
  3.     at org.hibernate.connection.UserSuppliedConnectionProvider.getConnection(UserSuppliedConnectionProvider.java:54)  
  4.     at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)  
  5.     at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)  
  6.     at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:142)  
  7.     at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:85)  
  8.     at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1353)  
  9.     at org.jbpm.pvm.internal.tx.HibernateSessionResource.<init>(HibernateSessionResource.java:44)  
  10.     at org.jbpm.pvm.internal.wire.descriptor.HibernateSessionDescriptor.construct(HibernateSessionDescriptor.java:87)  
  11.     at org.jbpm.pvm.internal.wire.WireContext.construct(WireContext.java:487)  
  12.     at org.jbpm.pvm.internal.wire.WireContext.create(WireContext.java:466)  
  13.     at org.jbpm.pvm.internal.wire.WireContext.create(WireContext.java:455)  
  14.     at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:429)  
  15.     at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:339)  
  16.     at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:704)  
  17.     at org.jbpm.pvm.internal.env.BasicEnvironment.get(BasicEnvironment.java:132)  
  18.     at org.jbpm.pvm.internal.env.BasicEnvironment.get(BasicEnvironment.java:123)  
  19.     at org.jbpm.pvm.internal.env.EnvironmentImpl.getFromCurrent(EnvironmentImpl.java:207)  
  20.     at org.jbpm.pvm.internal.env.EnvironmentImpl.getFromCurrent(EnvironmentImpl.java:196)  
  21.     at org.jbpm.pvm.internal.cmd.CheckDbCmd.execute(CheckDbCmd.java:44)  
  22.     at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)  
  23.     at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:50)  
  24.     at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)  
  25.     at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)  
  26.     at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:56)  
  27.     at org.jbpm.pvm.internal.svc.SkipInterceptor.execute(SkipInterceptor.java:43)  
  28.     at org.jbpm.pvm.internal.processengine.ProcessEngineImpl.checkDb(ProcessEngineImpl.java:152)  
  29.     at org.jbpm.pvm.internal.processengine.SpringProcessEngine.create(SpringProcessEngine.java:70)  
  30.     at org.jbpm.pvm.internal.cfg.ConfigurationImpl.buildProcessEngine(ConfigurationImpl.java:90)  
  31.     at org.jbpm.pvm.internal.processengine.SpringHelper.createProcessEngine(SpringHelper.java:50)  
  32.     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
  33.     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)  
  34.     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)  
  35.     at java.lang.reflect.Method.invoke(Unknown Source)  
  36.     at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:118)  
  37.     at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:332)  
  38.     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:782)  
  39.     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:709)  
  40.     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:384)  
  41.     at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)  
  42.     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)  
  43.     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)  
  44.     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)  
  45.     at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)  
  46.     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)  
  47.     at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)  
  48.     at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)  
  49.     at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)  
  50.     at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205)  
  51.     at org.apache.catalina.core.StandardContext.start(StandardContext.java:4704)  
  52.     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)  
  53.     at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)  
  54.     at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)  
  55.     at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)  
  56.     at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)  
  57.     at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)  
  58.     at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1315)  
  59.     at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)  
  60.     at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)  
  61.     at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)  
  62.     at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)  
  63.     at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)  
  64.     at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)  
  65.     at org.apache.catalina.core.StandardService.start(StandardService.java:525)  
  66.     at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)  
  67.     at org.apache.catalina.startup.Catalina.start(Catalina.java:595)  
  68.     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
  69.     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)  
  70.     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)  
  71.     at java.lang.reflect.Method.invoke(Unknown Source)  
  72.     at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)  
  73.     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414

解决方法:由于是使用Spring管理,所以jbpm.cfg.xml中的

<import resource="jbpm.tx.hibernate.cfg.xml" />

替换成

<import resource="jbpm.tx.spring.cfg.xml" />

你可能感兴趣的:(jbpm,职场,休闲)