0 Replies Latest reply on Apr 14, 2013 11:10 PM by TC ONG

    HumanTaskSpringTransactionManager commit problem

    TC ONG Newbie

      I have my setting as below and I get error 

      No value for key [org.apache.tomcat.jdbc.pool.DataSource@4....] bound to thread [http-bio-8080-exec-9]

      I am sure my data source is running and accessible. Is there anything else I should be looking at?

      <jee:jndi-lookup id="dataSource" jndi-name="java:comp/env/jdbc/geneozDB" resource-ref="true" />

           

      <bean id="htEmf" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">

              <property name="dataSource" ref="dataSource" />

        <property name="persistenceUnitName" value="org.jbpm.task" />

      <!--         <property name="loadTimeWeaver">

                  <bean class="org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver"/>

              </property>

      -->        <property name="persistenceXmlLocation" value="classpath:META-INF/my-persistence.xml" />

      </bean>

       

      <bean id="htEm" class="org.springframework.orm.jpa.support.SharedEntityManagerBean">

        <property name="entityManagerFactory" ref="htEmf" />

      </bean>

       

        <bean id="jpaTxMgr" class="org.springframework.orm.jpa.JpaTransactionManager">

        <property name="entityManagerFactory" ref="htEmf" />

        <!-- this must be true if using the SharedEntityManagerBean, and false otherwise           --> 

        <property name="nestedTransactionAllowed" value="true" />

      </bean>

       

      <bean id="htTxMgr" class="org.drools.container.spring.beans.persistence.HumanTaskSpringTransactionManager">

        <constructor-arg ref="jpaTxMgr" />

      </bean>

      <!-- human-task beans -->

      <bean id="systemEventListener" class="org.drools.SystemEventListenerFactory" factory-method="getSystemEventListener" />

       

      <bean id="taskService" class="org.jbpm.task.service.TaskService" >

                    <constructor-arg ref="htEmf" />

                    <constructor-arg ref="systemEventListener" />

      </bean>

       

      <bean id="springTaskSessionFactory"

        class="org.jbpm.task.service.persistence.TaskSessionSpringFactoryImpl"

        init-method="initialize" depends-on="taskService">

        <!-- if using the SharedEntityManagerBean, make sure to enable nested transactions -->

        <property name="entityManager" ref="htEm" />

        <property name="transactionManager" ref="htTxMgr" />

        <property name="useJTA" value="false" />

        <property name="taskService" ref="taskService" />

      </bean>

                                    
       WARN 2013-04-15 10:54:26,663 (HumanTaskSpringTransactionManager.java:65) - Unable to commit transaction
      java.lang.IllegalStateException: No value for key [org.apache.tomcat.jdbc.pool.DataSource@427174d9{ConnectionPool[defaultAutoCommit=null; defaultReadOnly=null; defaultTransactionIsolation=-1; defaultCatalog=null; driverClassName=com.mysql.jdbc.Driver; maxActive=100; maxIdle=100; minIdle=4; initialSize=4; maxWait=20; testOnBorrow=true; testOnReturn=false; timeBetweenEvictionRunsMillis=30000; numTestsPerEvictionRun=0; minEvictableIdleTimeMillis=30; testWhileIdle=false; testOnConnect=false; password=g3n30z1t; url=jdbc:mysql://192.168.10.13:3306/geneoz_data; username=root; validationQuery=SELECT 1; validatorClassName=null; validationInterval=30000; accessToUnderlyingConnectionAllowed=true; removeAbandoned=true; removeAbandonedTimeout=30; logAbandoned=true; connectionProperties=null; initSQL=null; jdbcInterceptors=null; jmxEnabled=true; fairQueue=true; useEquals=true; abandonWhenPercentageFull=0; maxAge=0; useLock=false; dataSource=null; dataSourceJNDI=null; suspectTimeout=0; alternateUsernameAllowed=false; }] bound to thread [http-bio-8080-exec-9]
           at org.springframework.transaction.support.TransactionSynchronizationManager.unbindResource(TransactionSynchronizationManager.java:209)
           at org.springframework.orm.jpa.JpaTransactionManager.doCleanupAfterCompletion(JpaTransactionManager.java:577)
           at org.springframework.transaction.support.AbstractPlatformTransactionManager.cleanupAfterCompletion(AbstractPlatformTransactionManager.java:1009)
           at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:805)
           at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:724)
           at org.drools.container.spring.beans.persistence.HumanTaskSpringTransactionManager.commit(HumanTaskSpringTransactionManager.java:63)
           at org.jbpm.task.service.persistence.TaskSpringTransactionManager.commit(TaskSpringTransactionManager.java:48)
           at org.jbpm.task.service.persistence.TaskPersistenceManager.endTransaction(TaskPersistenceManager.java:107)
           at org.jbpm.task.service.TaskServiceSession.doOperationInTransaction(TaskServiceSession.java:1118)
           at org.jbpm.task.service.TaskServiceSession.addTask(TaskServiceSession.java:189)
           at org.jbpm.task.service.local.LocalTaskService.addTask(LocalTaskService.java:70)
           at org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler.executeWorkItem(GenericHTWorkItemHandler.java:182)
           at org.drools.process.instance.impl.DefaultWorkItemManager.internalExecuteWorkItem(DefaultWorkItemManager.java:70)
           at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:107)
           at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:126)
           at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:279)
           at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:238)
           at org.jbpm.workflow.instance.node.JoinInstance.triggerCompleted(JoinInstance.java:152)
           at org.jbpm.workflow.instance.node.JoinInstance.internalTrigger(JoinInstance.java:52)
           at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:126)
           at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:279)
           at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:238)
           at org.jbpm.workflow.instance.node.ActionNodeInstance.triggerCompleted(ActionNodeInstance.java:55)
           at org.jbpm.workflow.instance.node.ActionNodeInstance.internalTrigger(ActionNodeInstance.java:51)
           at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:126)
           at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:279)
           at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:238)
           at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:49)
           at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:41)
           at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:126)
           at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:35)
           at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:194)
           at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:309)
           at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:170)
           at org.drools.common.AbstractWorkingMemory.startProcessInstance(AbstractWorkingMemory.java:1108)
           at org.drools.impl.StatefulKnowledgeSessionImpl.startProcessInstance(StatefulKnowledgeSessionImpl.java:330)
           at org.jbpm.workflow.instance.node.SubProcessNodeInstance.internalTrigger(SubProcessNodeInstance.java:142)
           at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:126)
           at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:279)
           at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:287)
           at org.jbpm.workflow.instance.node.SplitInstance.internalTrigger(SplitInstance.java:100)
           at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:126)
           at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:279)
           at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:238)
           at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:49)
           at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:41)
           at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:126)
           at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:35)
           at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:194)
           at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:309)
           at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:170)
           at org.drools.common.AbstractWorkingMemory.startProcessInstance(AbstractWorkingMemory.java:1108)
           at org.drools.impl.StatefulKnowledgeSessionImpl.startProcessInstance(StatefulKnowledgeSessionImpl.java:330)
           at org.jbpm.workflow.instance.node.SubProcessNodeInstance.internalTrigger(SubProcessNodeInstance.java:142)
           at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:126)
           at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:279)
           at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:287)
           at org.jbpm.workflow.instance.node.SplitInstance.internalTrigger(SplitInstance.java:100)
           at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:126)
           at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:279)
           at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:238)
           at org.jbpm.workflow.instance.node.JoinInstance.triggerCompleted(JoinInstance.java:152)
           at org.jbpm.workflow.instance.node.JoinInstance.internalTrigger(JoinInstance.java:52)
           at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:126)
           at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:279)
           at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:238)
           at org.jbpm.workflow.instance.node.ActionNodeInstance.triggerCompleted(ActionNodeInstance.java:55)
           at org.jbpm.workflow.instance.node.ActionNodeInstance.internalTrigger(ActionNodeInstance.java:51)
           at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:126)
           at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:279)
           at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:238)
           at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:49)
           at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:41)
           at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:126)
           at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:35)
           at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:194)
           at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:309)
           at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:170)
           at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:140)
           at org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1098)
           at org.drools.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:320)