-->
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.  [ 4 posts ] 
Author Message
 Post subject: java.lang.IllegalAccessError: tried to access field org.slf4
PostPosted: Mon Feb 09, 2009 8:53 am 
Newbie

Joined: Mon Feb 09, 2009 8:46 am
Posts: 4
Hi ,

I'm very new to Hibernate , i got this exception when trying to run this example http://www.javaworld.com/javaworld/jw-10-2004/jw-1018-hibernate.html the exception full stack are :



1. Exception in thread "main" java.lang.ExceptionInInitializerError
2. at hibernate.hibernateUtil.<clinit>(hibernateUtil.java:22)
3. at hibernate.HelloWorld.main(HelloWorld.java:20)
4. Caused by: java.lang.IllegalAccessError: tried to access field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory
5. at org.slf4j.LoggerFactory.<clinit>(LoggerFactory.java:60)
6. at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:151)
7. at hibernate.hibernateUtil.<clinit>(hibernateUtil.java:18)
8. ... 1 more

anything i'm missing ?

_________________
Thanks
Sherif


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 23, 2009 9:38 am 
Newbie

Joined: Thu Feb 19, 2009 12:24 pm
Posts: 14
I have the same problem. Did you solve this? If you did, could you please help me with a solution!?

Thanks!

_________________
Beginners must also learn!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 23, 2009 12:44 pm 
Newbie

Joined: Mon Feb 09, 2009 8:46 am
Posts: 4
Nicsoft wrote:
I have the same problem. Did you solve this? If you did, could you please help me with a solution!?

Thanks!


This problem caused because there are some package's version not compatable with each other so what i did is that i downloaded the latest version of log4j and and slf4j and put them in the classpathhttp://www.slf4j.org/download.html http://logging.apache.org/log4j/1.2/download.html
then run the project you will find the problem solved ...

_________________
Thanks
Sherif


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 23, 2009 1:10 pm 
Newbie

Joined: Thu Feb 19, 2009 12:24 pm
Posts: 14
Correct, I did the same and it worked. Cheers

_________________
Beginners must also learn!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.