The error means that Hibernate session holds an object of the same class and with the same ID as the object you are trying to saveOrUpdate( or its cascade reachable properties).
Such exception usually happens when session has loaded an object (perhaps indirectly as a property of another object) and now we supply a detached instance of the object to saveOrUpdate method.
As a general comment I would say that using Spring's HibernateTemplate is not good idea. It only seems convenient.
I recommend this approach
http://www.onjava.com/pub/a/onjava/2005 ... tions.html