-->
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.  [ 5 posts ] 
Author Message
 Post subject: could not instantiate CacheProvider
PostPosted: Thu Dec 25, 2003 11:31 pm 
Newbie

Joined: Thu Dec 25, 2003 9:47 pm
Posts: 1
Location: Malaysia
Hi,

I am using Tomcat 4.12, hibernate 2.1 and mysql database

During startup the tomcat server. Found the error as below:

could not instantiate CacheProvider: net.sf.ehcache.hibernate.Provider

Do u have any idea?

regards,
hauboon


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 26, 2003 12:52 pm 
Beginner
Beginner

Joined: Sun Dec 21, 2003 11:19 pm
Posts: 22
Location: Kentucky, USA
hauboon,
Not sure if this will help but ...
It appears that if no cache property is defined Hibernate uses ehcache. My problem was I had defined a cache and it kept looking for ehcache. The real problem was a space inside the double quotes (see below).
Code:
<!-- Wrong -->
      <property name="hibernate.cache.provider_class ">net.sf.hibernate.cache.HashtableCacheProvider</property>
<!-- Right -->
      <property name="hibernate.cache.provider_class">net.sf.hibernate.cache.HashtableCacheProvider</property>



The other option is to download ehcache at http://ehcache.sourceforge.net/
Timothy Vogel


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 26, 2003 2:07 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Either put ehcache.jar in your classpath or specify another cache provider


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 26, 2003 2:11 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
This comes up really often lately - I took the freedom to add this to the FAQ


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 29, 2003 6:41 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
gloeglm wrote:
This comes up really often lately - I took the freedom to add this to the FAQ

That's the purpose of the FAQ from the forum, feel free.

_________________
Emmanuel


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