Announcement Announcement Module
Collapse
No announcement yet.
javax.persistence.TransactionRequiredException: no transaction is in progress Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • javax.persistence.TransactionRequiredException: no transaction is in progress

    I keep getting this strange exception in the log when I force a flush on the EntityManger. It says there is no transaction in progress. However, as can be seen in bold in the stacktrace, Spring JTA Transaction manager is starting a new transaction. I am totally lost as what to do because it is kind of contradicting.

    Code:
    Hibernate: select deadline0_.id as id4_0_, deadline0_.deadline_date as deadline2_4_0_, deadline0_.escalated as escalated4_0_ from Deadline deadline0_ where deadline0_.id=?
    [2011-08-03 10:59:41,375] DEBUG pool-5-thread-1 org.springframework.transaction.jta.JtaTransactionManager - Creating new transaction with name [ae.emaratech.em.bpm.jbpm.DefaultEscalatedDeadlineHandler.executeEscalatedDeadline]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT,-java.lang.Throwable
    Hibernate: select task0_.id as id11_3_, task0_.allowedToDelegate as allowedT2_11_3_, task0_.taskInitiator_id as taskIni23_11_3_, task0_.priority as priority11_3_, task0_.activationTime as activati4_11_3_, task0_.actualOwner_id as actualO24_11_3_, task0_.createdBy_id as createdBy25_11_3_, task0_.createdOn as createdOn11_3_, task0_.documentAccessType as document6_11_3_, task0_.documentContentId as document7_11_3_, task0_.documentType as document8_11_3_, task0_.expirationTime as expirati9_11_3_, task0_.faultAccessType as faultAc10_11_3_, task0_.faultContentId as faultCo11_11_3_, task0_.faultName as faultName11_3_, task0_.faultType as faultType11_3_, task0_.outputAccessType as outputA14_11_3_, task0_.outputContentId as outputC15_11_3_, task0_.outputType as outputType11_3_, task0_.parentId as parentId11_3_, task0_.previousStatus as previou18_11_3_, task0_.processInstanceId as process19_11_3_, task0_.skipable as skipable11_3_, task0_.status as status11_3_, task0_.workItemId as workItemId11_3_, user1_.id as id6_0_, user2_.id as id6_1_, user3_.id as id6_2_ from Task task0_ left outer join OrganizationalEntity user1_ on task0_.taskInitiator_id=user1_.id left outer join OrganizationalEntity user2_ on task0_.actualOwner_id=user2_.id left outer join OrganizationalEntity user3_ on task0_.createdBy_id=user3_.id where task0_.id=?
    EXECUTInG executeEscalatedDeadline
    Hibernate: select escalation0_.Deadline_Escalation_Id as Deadline3_1_, escalation0_.id as id1_, escalation0_.id as id5_0_, escalation0_.name as name5_0_ from Escalation escalation0_ where escalation0_.Deadline_Escalation_Id=?
    Hibernate: select recipients0_.task_id as task1_1_, recipients0_.entity_id as entity2_1_, organizati1_.id as id6_0_, organizati1_.DTYPE as DTYPE6_0_ from Notification_Recipients recipients0_ left outer join OrganizationalEntity organizati1_ on recipients0_.entity_id=organizati1_.id where recipients0_.task_id=?
    [2011-08-03 10:59:41,421] DEBUG pool-5-thread-1 org.springframework.transaction.jta.JtaTransactionManager - Participating in existing transaction
    Hibernate: select attachment0_.TaskData_Attachments_Id as TaskData9_2_, attachment0_.id as id2_, attachment0_.id as id0_1_, attachment0_.accessType as accessType0_1_, attachment0_.attachedAt as attachedAt0_1_, attachment0_.attachedBy_id as attachedBy8_0_1_, attachment0_.attachmentContentId as attachme4_0_1_, attachment0_.contentType as contentT5_0_1_, attachment0_.name as name0_1_, attachment0_.attachment_size as attachment7_0_1_, user1_.id as id6_0_ from Attachment attachment0_ left outer join OrganizationalEntity user1_ on attachment0_.attachedBy_id=user1_.id where attachment0_.TaskData_Attachments_Id=?
    Hibernate: select comments0_.TaskData_Comments_Id as TaskData5_2_, comments0_.id as id2_, comments0_.id as id3_1_, comments0_.addedAt as addedAt3_1_, comments0_.addedBy_id as addedBy4_3_1_, comments0_.text as text3_1_, user1_.id as id6_0_ from task_comment comments0_ left outer join OrganizationalEntity user1_ on comments0_.addedBy_id=user1_.id where comments0_.TaskData_Comments_Id=?
    Hibernate: select emailheade0_.Notification_id as Notifica1_1_, emailheade0_.emailHeaders_id as emailHea2_1_, emailheade0_.mapkey as mapkey1_, emailnotif1_.id as id9_0_, emailnotif1_.body as body9_0_, emailnotif1_.fromAddress as fromAddr3_9_0_, emailnotif1_.language as language9_0_, emailnotif1_.replyToAddress as replyToA5_9_0_, emailnotif1_.subject as subject9_0_ from Notification_email_header emailheade0_ left outer join email_header emailnotif1_ on emailheade0_.emailHeaders_id=emailnotif1_.id where emailheade0_.Notification_id=?
    [2011-08-03 10:59:41,437] DEBUG pool-5-thread-1 org.springframework.transaction.jta.JtaTransactionManager - Participating in existing transaction
    [2011-08-03 10:59:41,437] DEBUG pool-5-thread-1 ae.emaratech.em.bpm.jbpm.DBUserInfoImp - Entity is an instance of User: true
    [2011-08-03 10:59:41,437] DEBUG pool-5-thread-1 ae.emaratech.em.bpm.jbpm.DBUserInfoImp - Entity is an instance of Group: false
    [2011-08-03 10:59:41,437] DEBUG pool-5-thread-1 ae.emaratech.em.bpm.jbpm.DBUserInfoImp - Geting Id of entity: USER3
    [2011-08-03 10:59:41,437] DEBUG pool-5-thread-1 ae.emaratech.em.bpm.jbpm.DBUserInfoImp - Converted unique Id of USER : 3
    [2011-08-03 10:59:41,437] DEBUG pool-5-thread-1 org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL query
    [2011-08-03 10:59:41,437] DEBUG pool-5-thread-1 org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL statement [SELECT E.ID AS E_ID, E.NAME_EN AS E_NAME_EN, E.NAME_AR AS E_NAME_AR,  EMAIL, USERNAME, PASSWORD, MANAGER_ID, STICKY_NOTES,  D.ID AS D_ID, D.NAME_EN AS D_NAME_EN, D.NAME_AR AS D_NAME_AR, D.PARENT_ID AS D_PARENT_ID,  DP.ID AS DP_ID,  P.ID AS P_ID, P.NAME_EN AS P_NAME_EN, P.NAME_AR AS P_NAME_AR   FROM EMPLOYEE E, DEPT_PROFESSION DP, DEPARTMENT D, PROFESSION P  WHERE E.DEPT_PROF_ID = DP.ID AND DP.DEPT_ID = D.ID AND P.ID =  DP.PROFESSION_ID  AND E.ID = ? LIMIT 1]
    [2011-08-03 10:59:41,437] DEBUG pool-5-thread-1 org.springframework.jdbc.datasource.DataSourceUtils - Fetching JDBC Connection from DataSource
    [2011-08-03 10:59:41,437] DEBUG pool-5-thread-1 org.springframework.jdbc.datasource.DataSourceUtils - Registering transaction synchronization for JDBC Connection
    [2011-08-03 10:59:41,468] DEBUG pool-5-thread-1 ae.emaratech.em.bpm.jbpm.DBUserInfoImp - Found email address  : null
    Hibernate: select reassignme0_.Escalation_Reassignments_Id as Escalation2_1_, reassignme0_.id as id1_, reassignme0_.id as id10_0_ from Reassignment reassignme0_ where reassignme0_.Escalation_Reassignments_Id=?
    Hibernate: select potentialo0_.task_id as task1_1_, potentialo0_.entity_id as entity2_1_, organizati1_.id as id6_0_, organizati1_.DTYPE as DTYPE6_0_ from Reassignment_potentialOwners potentialo0_ left outer join OrganizationalEntity organizati1_ on potentialo0_.entity_id=organizati1_.id where potentialo0_.task_id=?
    [2011-08-03 10:59:41,687] DEBUG pool-5-thread-1 org.springframework.jdbc.datasource.DataSourceUtils - Returning JDBC Connection to DataSource
    [2011-08-03 10:59:41,687] DEBUG pool-5-thread-1 org.springframework.transaction.jta.JtaTransactionManager - Initiating transaction rollback
    javax.persistence.TransactionRequiredException: no transaction is in progress
    	at org.hibernate.ejb.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:301)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:597)
    	at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:365)
    	at $Proxy59.flush(Unknown Source)
    	at ae.emaratech.em.bpm.jbpm.DefaultEscalatedDeadlineHandler.executeEscalatedDeadline(DefaultEscalatedDeadlineHandler.java:148)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:597)
    	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:311)
    	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
    	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
    	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
    	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
    	at $Proxy55.executeEscalatedDeadline(Unknown Source)
    	at org.jbpm.task.service.TaskService.executeEscalatedDeadline(TaskService.java:167)
    	at org.jbpm.task.service.TaskService$ScheduledTaskDeadline.call(TaskService.java:272)
    	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    Last edited by Franklin Antony; Aug 3rd, 2011, 03:17 AM.
Working...
X