-->
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: Transaction rollback and Cache invalidate problem.
PostPosted: Wed Dec 27, 2006 12:55 am 
Newbie

Joined: Mon Dec 19, 2005 8:33 am
Posts: 8
Hi,

We are using Hibernate 3.0 with JBoss 4.0.3 app server.

We came across a weird problem with hibernate- it automatically rollbacks transaction with no obvious reason .The problem is intermittent- probably occurs when the server is started, few transactions are performed and then kept idle (no transactions) for few days and then again perform some transaction.

Here is the log trace:

2006-12-20 15:46:54,021 DEBUG Loading PolicyBackup...
2006-12-20 15:46:54,022 DEBUG [org.hibernate.transaction.CacheSynchronization] transaction after completion callback, status: 4
2006-12-20 15:46:54,022 DEBUG [org.hibernate.jdbc.JDBCContext] after transaction completion
2006-12-20 15:46:54,022 DEBUG [org.hibernate.impl.SessionImpl] after transaction completion
2006-12-20 15:46:54,022 DEBUG [org.hibernate.cache.UpdateTimestampsCache] Invalidating space [public.customer], timestamp: 4778433798234112
2006-12-20 15:46:54,022 DEBUG [org.hibernate.cache.UpdateTimestampsCache] Invalidating space [public.customer], timestamp: 4778433798234113
2006-12-20 15:46:54,022 DEBUG [org.hibernate.cache.UpdateTimestampsCache] Invalidating space [public.groups], timestamp: 4778433798234114
2006-12-20 15:46:54,022 DEBUG [org.hibernate.cache.UpdateTimestampsCache] Invalidating space [public.customer], timestamp: 4778433798234115
2006-12-20 15:46:54,022 DEBUG [org.hibernate.cache.UpdateTimestampsCache] Invalidating space [public.groups], timestamp: 4778433798234116
2006-12-20 15:46:54,022 DEBUG [org.hibernate.cache.UpdateTimestampsCache] Invalidating space [public.users], timestamp: 4778433798234117
2006-12-20
15:46:54,022 DEBUG [org.hibernate.transaction.CacheSynchronization] automatically closing session
2006-12-20 15:46:54,023 DEBUG [org.hibernate.impl.SessionImpl] automatically closing session
2006-12-20 15:46:54,023 DEBUG [org.hibernate.impl.SessionImpl] closing session
2006-12-20 15:46:54,023 DEBUG [org.hibernate.jdbc.ConnectionManager] connection already null in cleanup : no action

To explain the log trace:

We have a Policy object which has a one-one relationship with PolicyBackup object.
i.e
Policy
{
String name;
String description;
PolicyBackup policyBackup;
.........
}

Here we are trying to load a Policy.The properties of the policy get loaded properly,but when we try to load the association policyBackup we get this error trace.I can see from the trace that transaction is rolled back(status-4)...don't why? And I also see the lines 'Invalidating space' in the trace.

When i restart server, everything works fine.Is it something related to hibernate caching - specifically second level cache?

Any ideas on why this could happen?

Thanks in advance,
Ram


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.