After persistent unit bundles are refreshed, hibernate still use the old class loader, leading to ClassCastException