-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Deleted Entity Returned Again JBoss EAP 6.4 / Hibernate 4.2
PostPosted: Thu May 07, 2015 5:41 pm 
Newbie

Joined: Wed Jun 27, 2007 1:52 pm
Posts: 2
I am upgrading an existing application to use JBoss EAP 6.4 with Hibernate 4.2. Code that previously worked that would select a row from the database, delete it, process the data, and loop back around, now seems to loop around and find the same row again. Multiple loops within a single JTA transaction seem to return the same row multiple times after I have deleted it. Once the JTA transaction commits, then the row is gone.

You can see below the "Object was already deleted' line. However, this is happening, because the same data is return from a query after it has been deleted. Any ideas as to what is causing the problem?

Code:
DELETE
20:51:08,663 TRACE [org.hibernate.event.internal.DefaultDeleteEventListener] (ThreadPoolExecutor-0) Deleting a persistent instance
20:51:08,663 TRACE [org.hibernate.event.internal.DefaultDeleteEventListener] (ThreadPoolExecutor-0) Deleting [PriorityWeightedScheduledTransaction#11659]
20:51:08,663 TRACE [org.hibernate.internal.SessionImpl] (ThreadPoolExecutor-0) Setting cache mode to: GET
20:51:08,663 TRACE [org.hibernate.internal.SessionImpl] (ThreadPoolExecutor-0) Setting cache mode to: NORMAL
20:51:08,663 TRACE [org.hibernate.internal.SessionImpl] (ThreadPoolExecutor-0) Setting cache mode to: GET
20:51:08,663 TRACE [org.hibernate.internal.SessionImpl] (ThreadPoolExecutor-0) Setting cache mode to: NORMAL
20:51:08,663 TRACE [org.springframework.transaction.interceptor.TransactionInterceptor] (ThreadPoolExecutor-0) Completing transaction for [HibernateCentralTransactionImpl.deletePriorityWeightedScheduledTransaction]


SELECT
0:51:08,662 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] ThreadPoolExecutor-0) Participating in existing transaction
20:51:08,663 TRACE [org.springframework.transaction.interceptor.TransactionInterceptor] (ThreadPoolExecutor-0) Getting transaction for [HibernateCentralTransactionImpl.deletePriorityWeightedScheduledTransaction]
20:51:08,807 TRACE [org.springframework.transaction.interceptor.TransactionInterceptor]
20:51:08,807 DEBUG [org.hibernate.stat.internal.ConcurrentStatisticsImpl] (ThreadPoolExecutor-0) HHH000117: HQL: from PriorityWeightedScheduledTransaction priorityWeightedScheduledTransaction where priorityWeightedScheduledTransaction.priority = ?  and priorityWeightedScheduledTransaction.processingTypeId in (5) and priorityWeightedScheduledTransaction.searchTypeId in (1) and priorityWeightedScheduledTransaction.databaseTypeId in (1) order by priorityWeightedScheduledTransaction.priority, priorityWeightedScheduledTransaction.id asc, time: 1ms, rows: 0
20:51:08,807 TRACE [org.springframework.transaction.interceptor.TransactionInterceptor] (priorityFlowControllerThreadPoolExecutor-0) Completing transaction for [HibernateCentralTransactionImpl.getPriorityWeightedScheduledCentralTransactionIdIterator]
20:51:08,807 DEBUG [org.hibernate.internal.IteratorImpl] (ThreadPoolExecutor-0) Assembling results
20:51:08,807 TRACE [org.hibernate.type.descriptor.sql.BasicExtractor] (ThreadPoolExecutor-0) Found [11659] as column [col_0_0_]


DELETE AGAIN
20:51:08,994 TRACE [org.springframework.transaction.interceptor.TransactionInterceptor] (ThreadPoolExecutor-0) Getting transaction for [HibernateCentralTransactionImpl.deletePriorityWeightedScheduledTransaction]
20:51:08,994 TRACE [org.hibernate.event.internal.DefaultDeleteEventListener] (ThreadPoolExecutor-0) Deleting a persistent instance
20:51:08,994 TRACE [org.hibernate.event.internal.DefaultDeleteEventListener] (ThreadPoolExecutor-0) Object was already deleted
20:51:08,994 TRACE [org.springframework.transaction.interceptor.TransactionInterceptor] (ThreadPoolExecutor-0) Completing transaction for [HibernateCentralTransactionImpl.deletePriorityWeightedScheduledTransaction]



Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.