-->
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: first Hibernate Applicationof Reference fails
PostPosted: Tue May 24, 2005 3:26 am 
Newbie

Joined: Fri May 13, 2005 5:20 am
Posts: 6
Hello,

I'm a new hibernate user. I want to exercise myself in Hibernate, so I'm trying to run the first Hibernate Application of the Hibernate Reference Documentation. But until now I'm not very succesful.

I'm using Eclipse 3.1M6, Hibernate3.0 and a mySQL database.

When I'm trying to run the Program I get the following message:


log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
Initial SessionFactory failed: java.lang.NoClassDefFoundError: net/sf/ehcache/CacheException
Exception in thread "main" java.lang.ExceptionInInitializerError
at HibernatUtil.<clinit>(HibernatUtil.java:15)
at TestClient.createAndStoreHoney(TestClient.java:23)
at TestClient.main(TestClient.java:13)
Caused by: java.lang.NoClassDefFoundError: net/sf/ehcache/CacheException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.hibernate.cfg.SettingsFactory.createCacheProvider(SettingsFactory.java:310)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:220)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1509)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1054)
at HibernatUtil.<clinit>(HibernatUtil.java:12)
... 2 more


I hope someone can give me a help. I don't know what I'm doing wrong.

Thanks,

Gaby


Top
 Profile  
 
 Post subject: log4j.properties
PostPosted: Tue May 24, 2005 5:27 am 
Newbie

Joined: Tue May 24, 2005 5:08 am
Posts: 6
I think that could be because you donĀ“t have a log4j.properties.
I had that error, well i had all errors to run my first application

good luck


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 24, 2005 6:29 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
well its seems you are missing ehcache from your classpath.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 24, 2005 7:21 am 
Newbie

Joined: Fri May 13, 2005 5:20 am
Posts: 6
Many thanks!!!

It runs without any errors and warnings!

The error was the ehcache that I hadn't in my classpath.
The missing log4j.properties have caused the warning.


So, thanks a lot to both replies

Gaby


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.