Changed scope of hibernate because of ClassCastException while deploying to CloudBees