upgrade hibernate from version 2 to version 4