Hide Forgot
Created attachment 831564 [details] stacktrace Description of problem: I believe that for the operations, requiring to be within a transaction (e.g. start of a process), the transactions should be created automatically when there are no transactions. For example, when I use Oracle11gR2 and I don't use transactions I get the following exception: [2013-12-02 07:01:18,314] ERROR- Mon Dec 02 07:01:18 EST 2013: Error when creating task on task server for work item id 1. Error reported by task server: no transaction is in progress javax.persistence.TransactionRequiredException: no transaction is in progress at org.hibernate.ejb.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:993) ~[hibernate-entitymanager-4.2.0.SP1-redhat-1.jar:4.2.0.SP1-redhat-1] at org.jbpm.shared.services.impl.JbpmJTATransactionManager.commit(JbpmJTATransactionManager.java:58) ~[jbpm-shared-services-6.0.0-redhat-6.jar:6.0.0-redhat-6] at org.jbpm.shared.services.impl.JbpmServicesPersistenceManagerImpl.endTransaction(JbpmServicesPersistenceManagerImpl.java:319) ~[jbpm-shared-services-6.0.0-redhat-6.jar:6.0.0-redhat-6] at org.jbpm.services.task.HumanTaskConfigurator$TransactionInterceptor.invoke(HumanTaskConfigurator.java:355) ~[jbpm-human-task-core-6.0.0-redhat-6.jar:6.0.0-redhat-6] at com.sun.proxy.$Proxy47.addTask(Unknown Source) ~[na:na] at org.jbpm.runtime.manager.impl.task.SynchronizedTaskService.addTask(SynchronizedTaskService.java:459) ~[jbpm-runtime-manager-6.0.0-redhat-6.jar:6.0.0-redhat-6] at org.jbpm.services.task.wih.LocalHTWorkItemHandler.executeWorkItem(LocalHTWorkItemHandler.java:65) ~[jbpm-human-task-workitems-6.0.0-redhat-6.jar:6.0.0-redhat-6] at org.drools.persistence.jpa.processinstance.JPAWorkItemManager.internalExecuteWorkItem(JPAWorkItemManager.java:56) [drools-persistence-jpa-6.0.0-redhat-6.jar:6.0.0-redhat-6] at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:124) [jbpm-flow-6.0.0-redhat-6.jar:6.0.0-redhat-6] at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:155) [jbpm-flow-6.0.0-redhat-6.jar:6.0.0-redhat-6] at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:337) [jbpm-flow-6.0.0-redhat-6.jar:6.0.0-redhat-6] at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:296) [jbpm-flow-6.0.0-redhat-6.jar:6.0.0-redhat-6] at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:66) [jbpm-flow-6.0.0-redhat-6.jar:6.0.0-redhat-6] at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:43) [jbpm-flow-6.0.0-redhat-6.jar:6.0.0-redhat-6] at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:155) [jbpm-flow-6.0.0-redhat-6.jar:6.0.0-redhat-6] at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:35) [jbpm-flow-6.0.0-redhat-6.jar:6.0.0-redhat-6] at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:222) [jbpm-flow-6.0.0-redhat-6.jar:6.0.0-redhat-6] at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:358) [jbpm-flow-6.0.0-redhat-6.jar:6.0.0-redhat-6] at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:189) [jbpm-flow-6.0.0-redhat-6.jar:6.0.0-redhat-6] at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:171) [jbpm-flow-6.0.0-redhat-6.jar:6.0.0-redhat-6] at org.drools.core.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1581) [drools-core-6.0.0-redhat-6.jar:6.0.0-redhat-6] at org.drools.core.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:366) [drools-core-6.0.0-redhat-6.jar:6.0.0-redhat-6] at org.drools.core.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:121) [drools-core-6.0.0-redhat-6.jar:6.0.0-redhat-6] at org.drools.core.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:40) [drools-core-6.0.0-redhat-6.jar:6.0.0-redhat-6] at org.drools.core.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36) [drools-core-6.0.0-redhat-6.jar:6.0.0-redhat-6] at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41) [drools-core-6.0.0-redhat-6.jar:6.0.0-redhat-6] at org.drools.persistence.SingleSessionCommandService$TransactionInterceptor.execute(SingleSessionCommandService.java:532) [drools-persistence-jpa-6.0.0-redhat-6.jar:6.0.0-redhat-6] at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41) [drools-core-6.0.0-redhat-6.jar:6.0.0-redhat-6] at org.drools.persistence.jpa.OptimisticLockRetryInterceptor.execute(OptimisticLockRetryInterceptor.java:71) [drools-persistence-jpa-6.0.0-redhat-6.jar:6.0.0-redhat-6] at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:374) [drools-persistence-jpa-6.0.0-redhat-6.jar:6.0.0-redhat-6] at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:232) [drools-core-6.0.0-redhat-6.jar:6.0.0-redhat-6] at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:223) [drools-core-6.0.0-redhat-6.jar:6.0.0-redhat-6] at org.jboss.qa.brms.jbpm.functional.bpmn2.task.HumanTaskTest.testHumanTaskProcess(HumanTaskTest.java:41) [test-classes/:na] MySQL 5.5 or other databases doesn't produce this type of error. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. Configure persistence.xml to use Oracle11gR2 database 2. Setup datasource and session persistence (for that you can use JbpmJUnitBaseTestCase) 3. Run a process containing a human task via java api (I'll add a link to the source code) 4. See the output - compare with the attached stacktrace Actual results: Expected results: Additional info:
fixed as part of persistence and transaction refactoring following commits are in relation to that: droolsjbpm-build-bootstrap https://github.com/droolsjbpm/droolsjbpm-build-bootstrap/commit/7f365310318e7e77fbf8cc299890b7cbe911a49e https://github.com/droolsjbpm/droolsjbpm-build-bootstrap/commit/88d614ec7d4a6e6d93ade0c237a2cb4c89a8fd4a https://github.com/droolsjbpm/droolsjbpm-build-bootstrap/commit/2eb32d3c0fa4604fc91bf7ef99836ab114e4f18b droolsjbpm-knowledge https://github.com/droolsjbpm/droolsjbpm-knowledge/commit/96cb2ea5901d8b33501060b5f12cfe1c05007b79 https://github.com/droolsjbpm/droolsjbpm-knowledge/commit/5d279b56cb8260ea3b8e95513f81b0c4829a73b5 drools https://github.com/droolsjbpm/drools/commit/ef447c571a5b8852e9d0660e23f18a6ff1a9983b jbpm https://github.com/droolsjbpm/jbpm/commit/cc430e3ccdf0bcb6fb0224950c1611c2c62aa351 https://github.com/droolsjbpm/jbpm/commit/00c938a5f9a150f7198c94ac34f4972ce6dfb373 https://github.com/droolsjbpm/jbpm/commit/eb69219fc0bf834c6a899d98aaef97cc441bd3ec https://github.com/droolsjbpm/jbpm/commit/3343fc92a731bdb811629421065715858653f074 https://github.com/droolsjbpm/jbpm/commit/75ce9b9a603bcb5b7ee3db046d4598ffacf96797 droolsjbpm-integration https://github.com/droolsjbpm/droolsjbpm-integration/commit/d9cd9b1046351f80b7ed9bbd4dfbca6b048158e5 https://github.com/droolsjbpm/droolsjbpm-integration/commit/e52f366bf9c186c48e5f4541d7992bd0a6835f66 jbpm-console-ng https://github.com/droolsjbpm/jbpm-console-ng/commit/6b8e0904b499657fc61987f057a4d41831f3eae9 https://github.com/droolsjbpm/jbpm-console-ng/commit/0f5d497aa7545ce63d627a077505f47fc800b2b5 https://github.com/droolsjbpm/jbpm-console-ng/commit/1c39b1cd9cd8f2a1a625ad03c3029cf4313cb7a9 https://github.com/droolsjbpm/jbpm-console-ng/commit/e3bd80e8c6deb907b27b4767e8d375b36facb420 kie-wb https://github.com/droolsjbpm/kie-wb-distributions/commit/76177b80238a73260415169cb331d50293d64631 https://github.com/droolsjbpm/kie-wb-distributions/commit/3a14ae382b2bc10737514b29bf966aab2abdea05
Verified in BPMS 6.0.0.ER7