-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Strange IllegalAccessError with JBoss + Hibernate
PostPosted: Fri Oct 27, 2006 6:14 am 
Newbie

Joined: Mon Aug 22, 2005 10:39 am
Posts: 7
Hi guys,

Sorry for cross-posting this from the JBoss forum but maybe it will have more visibility here.

I'm getting the following error when loading up my application on JBoss 4.0.5:

Code:
java.lang.IllegalAccessError: tried to access method org.hibernate.cfg.Mappings.<init>(Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/uti
l/Map;Ljava/util/List;Ljava/util/List;Lorg/hibernate/cfg/NamingStrategy;Ljava/util/Map;Ljava/util/Ma
p;Ljava/util/Map;Ljava/util/List;Ljava/util/Map;Ljava/util/Map;)V from class org.hibernate.cfg.Exten
dedMappings
   at org.hibernate.cfg.ExtendedMappings.<init>(ExtendedMappings.java:65)
   at org.hibernate.cfg.AnnotationConfiguration.createExtendedMappings(AnnotationConfiguration.java:16
6)
   at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:254)
   at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1039)
   at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1211)
   at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:154)
   at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:847)
   at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:385)
   at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.
java:126)


This application is running fine on Tomcat 5.5 and Glassfish (Sun JSAS 9.0), but not on JBoss.

Looking at the code, I see that the two classes (Mappings and ExtendedMappings) are declared to be in the same package (org.hibernate.cfg) but are located in 2 different JARs (Hibernate and Annotations). Maybe this is enforced more strictly by JBoss?

I'm running on Java 5, JBoss 4.0.5GA, Hibernate 3.2GA, Hibernate Annotations 3.2GA and Hibernate EntityManager 3.2GA. All the libraries are correctly deployed and there is no mistake in using a release candidate instead of the final release.

Any ideas?

Thanks,
GB


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 07, 2006 6:19 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
triple check the version numbers (they are displayed when log levels are at INFO

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.