NoClassDefFoundError: net/sf/ehcache/config/TerracottaConfiguration$ValueMode

Description

When using Terracotta Bigmemory EhCache a NoClassDefFoundError occurs.

It comes down to the simple fact that ValueMode no longer exists in the TerracottaConfiguration class. However org.hibernate.cache.ehcache.internal.util.HibernateUtil still makes use of this ValueMode causing it to throw the exception.

I have posted work around for this issue on the Terracotta forum which can be found here http://forums.terracotta.org/forums/posts/list/8783.page

Environment

Tomcat 6.0.35
IBM ISeries V6R1
Hibernate 4.2.7.Final
Hibernate-EhCache-4.2.7.Final
EhCache EE 2.7.5
Bigmemory 4.0.5
Terracotta Toolkit Runtime EE 4.0.5

Activity

Show:
Kendal Montgomery
January 4, 2014, 8:02 AM

I am running into this problem as well. I am using a work-around based on the suggestion in the forum article mentioned above and Alex's patch on github, but it would be great to be able to use hibernate-ehcache "out of the box" on a modern version of ehcache (enterprise or otherwise). It looks like the current artifacts want to use an over 2 year old version of ehcache-core (2.4.3, I think). The latest available in maven that's not enterprise is the net.sf.ehcache.internal:ehcache-core:2.7.4 I believe, which I tested with my fix, and it works. Also works with the ehcache-ee:2.7.5 version that is used with bigmemory-4.0.5. If there's any way this could be fixed by the time you release 4.3.0.Final that would be awesome, but I don't know if you've set the features to be released there or not.

Alex Snaps
March 12, 2014, 2:26 PM

I've updated the code and the pull request. This could go as part of 4.3 if agreed by the Hibernate team

Brett Meyer
March 19, 2014, 8:07 PM

Thanks to for the fix! Note that for backward compatibility, this is corrected for ORM 5 only. ORM 4.x apps need to continue to use ehcache 2.4-2.6. See the discussion on the pull request.

Akansha Nema
October 20, 2015, 8:35 PM
Edited

I am still running into this issue with Hibernate 5.0.2.FINAL and terracotta 4.3 enterprise verison. Is this issue fixed for ORM 5X?

Alex Snaps
November 10, 2015, 10:30 AM

Looks like the merged PR was lost from master before 5.0 was cut and only gets noticed now. Will be addressed as part of

Assignee

Brett Meyer

Reporter

Mark Kleijwegt

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

backportDecision

None

Affects versions

Priority

Major
Configure