Sometimes you might stumble upon this confusing exception.
org.hibernate.HibernateException: Found two representations of same collection: com.betweengo.Foos
This could have happened because after clearing a Hibernate session (
session.clear()) you updated a property that contains a collection. I found just making sure to clear the session once seemed to fix the problem but that may not be a suitable solution in more complex situations.
More information about this problem can be found at http://forum.hibernate.org/viewtopic.php?p=2231400.