-->
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: StaleObjectStateException
PostPosted: Wed Jun 06, 2007 8:52 am 
Newbie

Joined: Wed Jun 06, 2007 8:08 am
Posts: 3
Hibernate version:
3.1.3

Full stack trace of any exception that occurs:
org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [...#423030682]
at ...(....java:61)
at org.hibernate.action.EntityUpdateAction.preUpdate(EntityUpdateAction.java:216)
at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:64)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:140)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:297)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:985)
... (EJBs and such)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)

Name and version of the database you are using:
Oracle 10g
WebLogic 8.1

Hello everybody

This weird situation started to bug me yesterday, out of nowhere.
Description:
- Start WebLogic
- Under a test, I get an object through a remote EJB, update a field from value X to Y, the test ends with no errors at all
- The new value (Y) is successfully written to the DB (I check it through SQL client - Toad, just to mention)
- Without restarting WebLogic, I run the same test as before; the same object is retrieved (I use its key), and that field still have the X value, which I try to update to Y, but now the update call fails with the above exception; this situation will repeat endlessly if I keep running this test

If now I close and restart WebLogic and run the same test once again, the field have the Y value, as one might expect.
It's like hibernate is getting an 'image' from the DB once it is started with WebLogic. I did no configuration changes at all before this error appearing, however I work on a team project, so someone might have done it. It seems I'm the only team member with this issue, and till now nobody could figure out what's wrong in here.
I tried deactivating caches under hibernate.cfg.xml, but I didn't helped (note: there's only one table in L2 cache, and does not relate to the executed queries). I also never used hibernate before, so I don't know where to mess around trying to fix this.
I'm not sure this is an hibernate problem, it just seems to be the more likely explanation.

Any tip, file to check or anything else you could say to help me?
Many thanks in advance


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.