I understand that this is an old thread, but I just thought that I would add more information. I ran into this problem with our Java 1.7 project using maven 3.3.3 .
Our integration tests using Spring 3.1.4 worked fine until I added the hibernate-annotations (ver. 3.5.4) dependency to one of our artifacts. Then the artifact downstream begins to have the same IllegalAccessError mentioned above.
After spending hours trying to figure out the cause of the problem, I was able to fix it by changing the hibernate-annotations dependency, which I previously added to the hibernate-entitymanager . This fixed downstream integration testing issues.
My only mention of this was to note that I have never used different versions of Hibernate jars on a classpath . Maven showed all versions of sleep mode as 3.5.4, with the exception of several jars that should have different versions (for example, hibernate-common-annotations 3.2.0 ). So, I think the comment above is that different banks of sleep mode are not a problem in my case.
source share