我为JBPM6.1创建了一个spring-mvc项目。每当我使用DEFAULTBUILDER方法中传递的releaseId创建环境时,我都会遇到以下异常。
*
joinTransaction调用时没有活动的JTA事务
*
我正在使用引用ReleaseId的环境创建RuntimeManager。kJar已正确下载,但出现以下错误。当我从类路径中选择资产时,它工作得很好。流程实例也运行良好。
Design and Deploy Part
I have created one BPMN2 workflow in Kie-Workbench 6.1.0 Final. I deployed the KJar to nexus repository. KJar also contains the attached kmodule.xml.
Application-JBPM integration
RuntimeEnvironmentBuilder builder = RuntimeEnvironmentBuilder.Factory.get()
.newDefaultBuilder("com.emi","tools.itsr","1.0.2", "kbase", "ksessionbpmn")
.entityManagerFactory(jbpmEMF);
builder.userGroupCallback(new UserGroupCallBackImpl());
runtimeMgr = RuntimeManagerFactory.Factory.get()
.newSingletonRuntimeManager(builder.get(), "org.jbpm:Evaluation:1.0");
runtimeEngine = runtimeMgr.getRuntimeEngine(null);
ksessionBpm = runtimeEngine.getKieSession();
bpmTaskService = runtimeEngine.getTaskService()
但在上出现以下异常
RuntimeManagerFactory.Factory.get().newSingletonRuntimeManager(builder.get(), "org.jbpm:Evaluation:1.0");
异常
14:57:34976WARN[org.drowls.persistence.SingleSessionCommandService](http://127.0.0.1:8080-1)Couldnotcommitsession:javax.persistence.TransactionRequiredException:NoactiveJTAtransactiononjoinTransactioncallatorg.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:1233)[hibernate-entitymanager-4.2.0.Final-redhat-1.jar:4.2.0.Final-redhat-1]atorg.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:1183)[hibernate-entitymanager-4.2.0.Final-redhat-1.jar:4.2.0.Final-redhat-1]atorg.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.doJoinTransaction(ExtendedEntityManager Creator.java:350)[spring-orm-4.01.RELEASE.jar:4.0.1.RELEASE]atorg.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManager Creator.java:317)[spring-orm-4.01.RELEASE.jar:4.0.1.RELEASE]atcom.sun.proxy.$Proxy90.joinTransaction(未知源)atorg.drools.persistence.jpa.JpaPersistenceContext.jjoinTransaction(JpaPersstenceContext.java:66)[dlools-persistence-jpa-6.1.0.Final.jar:6.1.0.Final]atorg.drools.persistence.SingleSessionCommandService.(SingleSessionCommandServices.java:102)[dlools-persistence-jpa-6.1.0.Final.jar:6.1.0.Final]atsun.reflect.NativeConstructorAccessorImpl.newInstance0(NativeMethod)[rt.jar:1.7.0_72]atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessor Impl.java:57)[rt.jar:1.7.0_72]atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessor Impl.java:45)[rt.jar:1.7.0_72]atjava.lang.reflect.Controller.newInstance(Constructor.java:526)[rt.jar:1.7.0_72]atorg.drools.persistence.jpa.NKnowledgeStoreServiceImpl.buildCommandService(KnowledgeStoreService Impl.java:150)[dlools-persistence-jpa-6.1.0.Final.jar:6.1.0.Final]atorg.drools.persistence.jpa.NowdgeStoreServiceImpl.newKieSession(KnowledgeStoreServiceImpl.java:70)[dlools-persistence-jpa-6.1.0.Final.jar:6.1.0.Final]atorg.drools.persistence.jpa.NowdgeStoreServiceImpl.newKieSession(KnowledgeStoreServiceImpl.java:39)[dlools-persistence-jpa-6.1.0.Final.jar:6.1.0.Final]atorg.kie.internal.persistence.jpa.JPAKacknowledgeService.newStatefulKnowledgeSession(JPAKackledgeService.java:121)[kie-internal-6.1.0.Final.jar:6.1.0.Final]atorg.jbpm.runtime.manager.impl.factory.JPASessionFactory.newKieSession(JPASessionFactory.java:42)[jbpm-runtime-manager-6.1.0.Final.jar:6.1.0.Final]atorg.jbpm.runtime.manager.impl.SingletonRuntimeManager.init(SingletonRuntimeManager.java:95)[jbpm-runtime-manager-6.1.0.Final.jar:6.1.0.Final]atorg.jbpm.runtime.manager.impl.RuntimeManagerFactoryImpl.newSingletonRuntimeManager(RuntimeManagerFactoryImpl.java:71)[jbpm-runtime-manager-6.1.0.Final.jar:6.1.0.Final]atcom.emirates.workflow.service.impl.ProcessServiceImpl.createRuntimeManager(ProcessServiceImpl.java:76)[classes:]atcom.emirates.workflow.service.impl.ProcessServiceImpl.startProcess(ProcessServiceImpl.java:51)[classes:]atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)[rt.jar:1.7.0_72]atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[rt.jar:1.7.0_72]atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[rt.jar:1.7.0_72]atjava.lang.reflect.Method.ioke(Method.java:606)[rt.jar:1.7.0_72]atorg.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)[spring-aop-4.0.1.REASE.jar:4.0.1.RELEASE]atorg.springframework.aop.framework.JdkDynamicAopProxy.invokeatcom.sun.proxy.$Proxy76.startProcess(未知源)atcom.emirates.workflow.service.impl.WorkflowServiceImpl.startProcess(WorkflowServiceImpl.java:25)[classes:]atcom.emirates.workflow.controller.JbpmController.fetchProcessTaskDetails(JbpmControloller.java:46)[classes:]atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)[rt.jar:1.7.0_72]atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[rt.jar:1.7.0_72]atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[rt.jar:1.7.0_72]atjava.lang.reflect.Method.ioke(Method.java:606)[rt.jar:1.7.0_72]atorg.springframework.web.method.support.IInvocableHandlerMethod.invoke(InvocableHandler method.java:214)[spring-web-4.0.1.REASE.jar:4.0.1.RELEASE]atorg.springframework.web.method.support.InvocaleHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)[spring-web-4.0.1.REASE.jar:4.0.1.RELEASE]atorg.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)[spring-webmvc-4.0.1.RELEASE.jar:4.0.1.RELENSE]atorg.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethodatorg.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandledAdapter.java:690)[spring-webmvc-4.0.1.RELEASE.jar:4.0.1.RELENSE]atorg.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethod Adapter.java:83)[spring-webmvc-4.0.1.RELEASE.jar:4.0.1.RELENSE]atorg.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:945)[spring-webmvc-4.0.1.RELEASE.jar:4.0.1.RELEASE]atorg.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:876)[spring-webmvc-4.0.1.RELEASE.jar:4.0.1.RELENSE]atorg.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)[spring-webmvc-4.0.1.RELEASE.jar:4.0.1.RELENSE]atorg.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:863)[spring-webmvc-4.0.1.RELEASE.jar:4.0.1.RELENSE]atjavax.servlet.httpHttpServlet.service(HttpServlet.java:754)[jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]atorg.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)[spring-webmvc-4.0.1.RELEASE.jar:4.0.1.RELENSE]atjavax.servlet.httpHttpServlet.service(HttpServlet.java:847)[jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295)[jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)[jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]atorg.apache.catalina.core.StandardWrapperValv.invoke(StandardWrapperValve.java:230)[jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]atorg.apache.catalina.core.StandardContextValv.invoke(StandardContextValv.java:149)[jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]atorg.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.ioke(WebNonTxEmCloserValve.java:50)[jboss-as-jpa-7.2.0.Final-redhat-8.jaratorg.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.ioke(WebNonTxEmCloserValve.java:50)[jboss-as-jpa-7.2.0.Final-redhat-8.jaratorg.jboss.as.web.security.SecurityContextAssociationValv.invoke(SecurityContextAssociationValv.java:169)[jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]atorg.apache.catalina.core.StandardHostValv.invoke(StandardHostValve.java:145)[jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]atorg.apache.catalina.vals.ErrorReportValve.ioke(ErrorReportValve.java:97)[jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]atorg.apache.catalina.core.StandardEngineValv.invoke(StandardEngineValv.java:102)[jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]atorg.apache.catalina.connecter.CoyoteAdapter.service(Coyotedapter.java:336)[jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]atorg.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)[jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]atorg.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)[jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]atorg.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920)[jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]atjava.lang.Thread.run(线程.java:745)[rt.jar:1.7.0_72]
14:57:35033ERRORstderrjava.lang.IllegalStateException:java.lang.reflect.IInvocationTargetException14:57:35035ERRORstderratorg.drowls.persistence.jpa.NKnowledgeStoreServiceImpl.buildCommandService(KnowledgeStoreService Impl.java:164)14:57:35035ERRORstderratorg.drowls.persistence.jpa.NKnowledgeStoreServiceImpl.newKieSession(KnowledgeStoreService Impl.java:70)14:57:35035ERRORstderratorg.drowls.persistence.jpa.NKnowledgeStoreServiceImpl.newKieSession(KnowledgeStoreService Impl.java:39)14:57:35035ERRORstderratorg.kie.internal.persistence.jpa.JPAKnowledgeService.newStatefulKnowledgeSession(JPAKknowledgeService.java:121)14:57:35036ERRORstderratorg.jbpm.runtime.manager.impl.factory.JPASessionFactory.newKieSession(JPASessionFactory.java:42)14:57:35036ERRORstderratorg.jbpm.runtime.manager.impl.SingletonRuntimeManager.init(SingletonRuntimeManager.java:95)14:57:35036ERRORstderratorg.jbpm.runtime.manager.impl.RuntimeManagerFactoryImpl.newSingletonRuntimeManager(RuntimeManagerFactoryImpl.java:71)14:57:35036ERRORstderratcom.emilates.workflow.service.impl.ProcessServiceImpl.createRuntimeManager(ProcessServiceImpl.java:76)14:57:35037ERRORstderratcom.emilates.workflow.service.impl.ProcessServiceImpl.startProcess(ProcessServiceImpl.java:51)14:57:35037ERRORstderratsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)14:57:35037ERRORstderratsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)14:57:35038ERRORstderratsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)14:57:35038ERRORstderratjava.lang.reflect.Method.ioke(Method.java:606)14:57:35038ERRORstderratorg.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)14:57:35038ERRORstderratorg.springframework.aop.framework.JdkDynamicAopProxy.invoke14:57:35039ERRORstderratcom.sun.proxy.$Proxy76.startProcess(未知源)14:57:35039ERRORstderratcom.emilates.workflow.service.impl.WorkflowServiceImpl.startProcess(WorkflowServiceImpl.java:25)14:57:35039ERRORstderratcom.emilates.workflow.controller.JbpmController.fetchProcessTaskDetails(JbpmControloller.java:46)14:57:35039ERRORstderratsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)14:57:35039ERRORstderratsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)14:57:55040ERRORstderratsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)14:57:55040ERRORstderratjava.lang.reflect.Method.ioke(Method.java:606)14:57:55040ERRORstderratorg.springframework.web.method.support.IInvocableHandlerMethod.invoke(InvocableHandler方法.java:214)14:57:55040ERRORstderratorg.springframework.web.method.support.InvocaleHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)14:57:35041ERRORstderratorg.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)14:57:35041ERRORstderratorg.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdaper.java:749)14:57:35041ERRORstderratorg.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdaper.java:690)14:57:35042ERRORstderratorg.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethod Adapter.java:83)14:57:5042ERRORstderratorg.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:945)14:57:35042ERRORstderratorg.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:876)14:57:5042ERRORstderratorg.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)14:57:35043ERRORstderratorg.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:863)14:57:35043ERRORstderratjavax.servlet.httpHttpServlet.service(HttpServlet.java:754)14:57:35043ERRORstderratorg.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)14:57:35044ERRORstderratjavax.servlet.httpHttpServlet.service(HttpServlet.java:847)14:57:35044ERRORstderratorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295)14:57:35044ERRORstderratorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)14:57:35044ERRORstderratorg.apache.catalina.core.StandardWrapperValv.invoke(StandardWrapperValve.java:230)14:57:35044ERRORstderratorg.apache.catalina.core.StandardContextValv.invoke(StandardContextValv.java:149)14:57:35045RRORstderratorg.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.ioke(WebNonTxEmCloserValve.java:50)14:57:35045RRORstderratorg.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.ioke(WebNonTxEmCloserValve.java:50)14:57:35045ERRORstderratorg.jboss.as.web.security.SecurityContextAssociationValve.ioke(SecurityContextAssociationValve.java:169)14:57:35045RRORstderratorg.apache.catalina.core.StandardHostValve.ioke(StandardHostValve.java:145)14:57:35046ERRORstderratorg.apache.catalina.vals.ErrorReportValve.ioke(ErrorReportValve.java:97)14:57:35046ERRORstderratorg.apache.catalina.core.StandardEngineValve.ioke(StandardEngineValve.java:102)14:57:35046ERRORstderratorg.apache.catalina.connecter.CoyoteAdapter.service(Coyotedapter.java:336)14:57:35046ERRORstderratorg.apache.coyote.http11.Http11Processor.procle(Http11Processor.java:856)14:57:35047ERRORstderratorg.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)14:57:35047ERRORstderratorg.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920)14:57:35047ERRORstderratjava.lang.Thread.run(线程.java:745)14:57:35048错误原因:java.lang.reflect.InvocationTargetException14:57:35048ERRORstderratsun.reflect.NativeConstructorAccessorImpl.newInstance0(NativeMethod)14:57:35048ERRORstderratsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessor Impl.java:57)14:57:35048ERRORstderratsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessor Impl.java:45)14:57:35048ERRORstderratjava.lang.reflect.Controller.newInstance(Constructor.java:526)14:57:35049ERRORstderratorg.drowls.persistence.jpa.NKnowledgeStoreServiceImpl.buildCommandService(KnowledgeStoreService Impl.java:150)14:57:35049错误。。。49更多14:57:35049 ERRORstderr原因:javax.persistence.TransactionRequiredException:NoactiveJTAtransactiononjoinTransactioncall14:57:35049ERRORstderratorg.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:1233)14:57:35050ERRORstderratorg.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:1183)14:57:35050ERRORstderratorg.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.doJoinTransaction(ExtendedEntityManager Creator.java:350)14:57:35053ERRORstderratorg.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManager Creator.java:317)14:57:35053ERRORstderratcom.sun.proxy.$Proxy90.joinTransaction(未知源)14:57:35053ERRORstderratorg.drowls.persistence.jpa.JpaPersistenceContext.jjoinTransaction(JpaPersisticeContext.java:66)14:57:35054ERRORstderratorg.drowls.persistence.SingleSessionCommandService。(SingleSessionCommandService.java:102)14:57:35054错误。。。54更多