Hibernate 4 has removed the deprecated CacheProvider
-related interfaces and classes in favor of the previously released RegionFactory
-related cache interface. You can find the version 4 cache package summary here, the version 3.2 cache package summary here (just before the RegionFactory
interface was added) and the version 3.3 cache package summary here (when RegionFactory
was first released).
Other than the JavaDoc, you might find the following documentation useful:
However, based on the Spring 3.1 dependencies Spring 3.1 does not require Hibernate 4 (under the Full Dependencies
section, JBoss Hibernate Object-Relational Mapper
is at version 3.3.2.GA
). If you want to upgrade to Hibernate 4, you'll need to update your cache settings. Otherwise, try using Hibernate 3.3.2 or higher 3.X version instead.
UPDATE: Keep in mind, Hibernate 4 documentation in Spring 3.1 is currently sparse. The Spring Framework Reference Documentation
only has the following for Support for Hibernate 4.x:
See Javadoc for classes within the new org.springframework.orm.hibernate4 package
Spring 3.1 introduces the LocalSessionFactoryBuilder
, which extends Hibernate's Configuration
.
It would seem you should keep an eye out for some other changes if you want to use Hibernate 4.
UPDATE 2: Just noticed this question is a close duplicate of Exception NoClassDefFoundError for CacheProvider.