On upgrading Hibernate from version 3 to version 5, I got the above error.
Turned out that we were also using Mockito and it also has a dependency on byte buddy. So there was conflict of versions of byet buddy.
So here is fix:
exclude the byte-buddy jar from mockito.