java.lang.ClassNotFoundException: org.hibernate.cache.EhCacheProvider

12,199

Solution 1

The dependency you're looking for is the following I think (Perhaps a different version)

<dependency>
    <groupId>org.hibernate</groupId>
    <artifactId>hibernate-ehcache</artifactId>
    <version>3.6.2.Final</version>
</dependency>

I searched for the missing class using Maven Central's search site:

http://search.maven.org/#search|ga|1|fc%3A%22org.hibernate.cache.EhCacheProvider%22

Solution 2

When I ran into this problem, it was because I was trying to update the version of hibernate. When moving from hibernate 3.2 to 3.3, the packages split. I had tried to replace hibernate with hibernate-core. Reverting back to the full hibernate package (at 3.2 level) fixed my problem.

During my next round of updates, I will probably need to replace the full hibernate package with hibernate-core and hibernate-ehcache as referenced above.

Share:
12,199
Renukeswar Chinta
Author by

Renukeswar Chinta

Updated on July 23, 2022

Comments

  • Renukeswar Chinta
    Renukeswar Chinta almost 2 years

    java.lang.ClassNotFoundException: org.hibernate.cache.EhCacheProvider In my pom.xml dependency for ecahce is like below

       <dependency>
            <groupId>net.sf.ehcache</groupId>
            <artifactId>ehcache</artifactId>
            <version>1.5.0</version>
        </dependency>
    

    but still i am facing the problem classNotFound Exception

    Please help me out iam trying this out from past 2 days