The cause of the problem was the call to hashCode method in the BaseDao class (Super class in this instance) that was trying to create a unique hashcode with all the elements of the persistent class (Base class in this Instance). The persistent class was having a Set of another Persistent class. Example : X was consisting a Set of Y, Where the set of Y was pretty large and it consisted of another Set. So this process of creating hashCode from a set of set took a long time and created this problem.
Solution was to override the hashCode method in the Base class and create the hashCode using String Instance variables and avoiding the set's variables.