When working on any application which Uses Java + Hibernate 3, you face errors like the one shown below: java.lang.ClassCastException: org.hibernate.impl.CriteriaImpl cannot be cast to

When working on any application which Uses Java + Hibernate 3, you face errors like the one shown below: java.lang.ClassCastException: org.hibernate.impl.CriteriaImpl cannot be cast to
Here the problem wasn’t actually a looping chain of synonyms, but the fact that the synonym was pointing to a view that did not exist.