Thread:
 Found a solution 
 sgm   10 Sep 2008, 22:45 

Comment
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
From: sgm (10 Sep 2008, 22:45) Replies: 0, Views: 579
Subject: Found a solution
It took me a while, but I found the IllegalAccessError is caused when 
you create separate Eclipse plug-ins for hibernate and hibernate-
annotations. The reason is they share a common package 
(org.hibernate.cfg) and Eclipse will load them with separate class 
loaders. In this case, a superclass cannot be accessed because it was 
loaded in a different class loader.

My fix was to place both hibernate and hibernate-annotations into a 
single Eclipse plug-in.

If you're using Eclipse 3.3+, you'll get another error regarding 
javax/management/MBeanServer which is caused because hibernate 
includes the JMX jars which are part of Eclipse. Remove them from your 
hibernate plug-in.
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
© Copyright 2006, Red Hat Middleware, LLC. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc. [Privacy Policy]