title: java.lang.NoClassDefFoundError: org/hibernate/cache/spi/RegionFactory - When upgrading from spring 3 to spring 4
body: <p>I'm updating my spring project from 3.0.5 to 4.0.3. </p>
  
  <p>Everything's building fine, but at boot time, when spring tries to create beans, I'm hitting this error message:</p>
  
  <p><img src="https://i.stack.imgur.com/7D6oU.png" alt="enter image description here"></p>
  
  <p>The class is of course not present in ehcache-core, hibernate-ehcache, or hibernate-core. In fact, the package <code>spi</code> just isn't present anywhere it seems. However, I've checked the maven dependencies, and it seems like spring 4.0.3 and hibernate 3.6.10 should be fully compatible. In my pom I directly depend on hibernate-ehcache, which in turn pulls in the appropriate version of ehcache-core automatically(apparently the done thing), like this: </p>
  
  <p>My dependencies look like: </p>
  
  <p><img src="https://i.stack.imgur.com/lQnAB.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/6Sft1.png" alt="enter image description here"></p>
  
  <p>I've searched extensively for this error, but can only find a couple of references to it. Given it's obscurity, I'm guessing it's a configuration within my project somewhere that's referencing this RegionFactory class, however, despite much searching, I can't find a thing. </p>
  
  <p>Any ideas how I can get this project building with spring 4.0.3?? </p>
  
  <p>I can provide any additional data you need. </p>
  
  <p>The key is to get the project building against Spring 4.0.3.Release. Whatever version of hibernate or ehcache enables me to do that doesn't really matter. Obviously My preferencs would be pom changes over reconfiguring over changing code... but I'll take what I can get at this point. </p>
  
  <p>EDIT: 
  I'm trying to <em>avoid updating my hibernate past 4.x.y</em> as this project is very large and uses <code>HibernateDaoSupport</code> and <code>HibernateTemplate</code> very extensively (thousands of independent usages which would take a long time to refactor) </p>