upgrade hibernate from v2 to v4