The StaleStateException is fairly consistent in why it is thrown:
Quote:
Thrown when a version number or timestamp check failed, indicating that the Session contained stale data (when using long transactions with versioning). Also occurs if we try delete or update a row that does not exist.
Note that this exception often indicates that the user failed to specify the correct unsaved-value strategy for a class!
http://www.hibernate.org/hib_docs/v3/api/org/hibernate/StaleStateException.html
My guess is that you might be updating or deleting records before they are even committed to the database. saveOrUpdate does not need to be called if the objects are already associated with the session. You may be issuing this call too often. See if the objects you are saving are indeed detached or transient objects, and not persistent objects under the spell of the Hibernate Session.
This tutorial on How Hibernate Works might be helpful.
http://www.hiberbook.com/HiberBookWeb/learn.jsp?tutorial=07howhibernateworks
-Cameron McKenzie