File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes Could not instantiate cache implementation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Could not instantiate cache implementation" Watch "Could not instantiate cache implementation" New topic
Author

Could not instantiate cache implementation

Pramod Kumar
Ranch Hand

Joined: Oct 05, 2007
Posts: 40
Hi,

I am getting the following exception,

javax.persistence.PersistenceException: org.hibernate.HibernateException: Could not instantiate cache implementation

---------

org.hibernate.HibernateException: Could not instantiate cache implementation


--------

org.hibernate.cache.NoCachingEnabledException: Second-level cache is not enabled for usage [hibernate.cache.use_second_level_cache | hibernate.cache.use_query_cache]


I have placed

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

in my persistance.xml under properties tag and still I am getting this exception .....

Thanks,
Pramod.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

But did you also set

hibernate.cache.use_second_level_cache
or
hibernate.cache.use_query_cache

to "true"

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Pramod Kumar
Ranch Hand

Joined: Oct 05, 2007
Posts: 40
I have used
<property name="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</property>

it started working.

Thanks,
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

Originally posted by Pramod Kumar:
I have used
<property name="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</property>

it started working.

Thanks,


Cool
 
 
subject: Could not instantiate cache implementation