-
1. Re: Strange IllegalAccessError with JBoss + Hibernate
leizhu Oct 29, 2006 3:33 PM (in response to gbilodeau)The problem is the the Mapping construction is default. Your annotation class is probably not in the lib directory and are loaded by different class loader. So even though the invoking class is in the same package, the a class in the annotation jar cannot call the default constructor loaded by another class loader. Try to move your hibernate annotation jar to the lib directory.
TS -
2. Re: Strange IllegalAccessError with JBoss + Hibernate
gbilodeau Oct 30, 2006 2:03 AM (in response to gbilodeau)Hi and thanks for your answer. Currently all my Hibernate libraries (Core, Annotations and EntityManager) are packaged in my EAR root - this packaging seems to be working fine on other app servers. Is the conflict due to the presence of the hibernate3.jar and jboss-hibernate.jar files in the ${JBOSS_HOME}/server/default/lib directory? And is this previous directory the "lib" directory you're mentioning in your message?
-
3. Re: Strange IllegalAccessError with JBoss + Hibernate
mikebaranczak Feb 26, 2007 4:59 PM (in response to gbilodeau)I just got bit by the same problem.
Copy hibernate-annotations.jar and ejb3-persistence.jar to ${JBOSS_HOME}/server/default/lib. (Not sure why that second one is necessary, but if it's just in your application's lib directory, it won't work.) In other words, all your Hibernate-related classes have to be loaded from the same place.