Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Could not instantiate cache implementation

 
Pramod Kumar
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But did you also set

hibernate.cache.use_second_level_cache
or
hibernate.cache.use_query_cache

to "true"

Mark
 
Pramod Kumar
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have used
<property name="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</property>

it started working.

Thanks,
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Pramod Kumar:
I have used
<property name="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</property>

it started working.

Thanks,


Cool
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic