upgrade hibernate from 3 to 4 to fix the bugs