-->
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.  [ 2 posts ] 
Author Message
 Post subject: StaleObjectStateException
PostPosted: Fri May 05, 2006 10:11 am 
Newbie

Joined: Wed Dec 14, 2005 7:27 am
Posts: 18
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3

Debug level Hibernate log excerpt:

Code:
org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.jboss.portal.core.impl.model.portal.PageImpl#34835]
   at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1634)
   at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2293)
   at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2439)
   at org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.java:65)
   at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243)
   at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:227)
   at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:145)
   at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296)
   at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
   at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:905)




I'm using jboss, and when i redeploy my ear with jboss application server running, i get the prior erro. I can only solve this problem, restarting the application server.

There are 3 users that acesses the same database at same time.

What is the problem? How can i solve it?

Thanks,
Pedro


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 05, 2006 10:57 am 
Expert
Expert

Joined: Fri Aug 19, 2005 2:11 pm
Posts: 628
Location: Cincinnati
I don't know what that has to do with redeploying, but that's a typical concurrent user problem. That is happening because some object (row) is retrieved from the database by one program or user. Then, another program or user retrieves that same row, changes it, saves the changes. Then, the first user tries to save it, and hibernate explodes cause the database is different from what is has in memory.

_________________
Chris

If you were at work doing this voluntarily, imagine what you'd want to see to answer a question.


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

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.