Changed hibernate to version 4 from 3.6