-->
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.  [ 1 post ] 
Author Message
 Post subject: SettingsFactory uses wrong EHCache
PostPosted: Mon Mar 21, 2005 2:05 pm 
Beginner
Beginner

Joined: Tue Aug 10, 2004 8:59 am
Posts: 47
I have gone through the hibernate 3 migration guide, and now I am a bit puzzled why setting the caching provider class does not work. I have added the following hibernate property:

<property name="hibernate.cache.provider_class">
org.hibernate.cache.EhCacheProvider</property>

and hibernate correctly states that the right cache provider is in use:

18:33:02,437 INFO [SettingsFactory] Cache provider: org.hibernate.cache.EhCache
Provider

Still, when creating my session factory I get the exception below, which states that Hibernate attempts to load classes from the old net/sf/ehcache/ package.

Has anyone got a clue why Hibernate does this? Any hints would be highly appreciated.

Randahl






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:262)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:
184)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1497
)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.jav
a:1041)
at dk.rockit.puls.server.hibernate.SessionManager.initialize(SessionMana
ger.java:54)


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

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.