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
|