title: Another CacheManager with same name 'cacheManager' already exists in the same VM
body: <p>I receive this error when starting tomcat with ehcache and Spring. </p>
  
  <pre><code>Another CacheManager with same name 'cacheManager' already exists in the same VM. Please 
  provide unique names for each CacheManager in the config or do one of following:
  1. Use one of the CacheManager.create() static factory methods to reuse same
     CacheManager with same name or create one if necessary
  2. Shutdown the earlier cacheManager before creating new one with same name.
  </code></pre>
  
  <ul>
  <li>Spring 3.1</li>
  <li>ehcache 2.9.0</li>
  <li>No test context using this.</li>
  <li>This is a web JSF app. </li>
  </ul>
  
  <p>ehcache.xml</p>
  
  <pre><code>         &lt;ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:noNamespaceSchemaLocation="ehcache.xsd"
              updateCheck="true"
              monitoring="autodetect"
              dynamicConfig="true"
              name="ehcacheManager"
              &gt;
          ....
  
      &lt;/ehcache&gt;
  </code></pre>
  
  <p>cache-context.xml</p>
  
  <pre><code>        &lt;bean id="cacheManager" 
  
          class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" scope="singleton"&gt;
                  &lt;property name="shared" value="true"/&gt;
                  &lt;property name="configLocation"&gt;
                      &lt;value&gt;classpath:ehcache.xml&lt;/value&gt;
                  &lt;/property&gt;
              &lt;/bean&gt;
  </code></pre>
  
  <p>I do have and old dependency to hibernate-ehcache, that unfortunately I can not delete. Could this be the issue?</p>
  
  <pre><code>  &lt;dependency&gt;
                     &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
                     &lt;artifactId&gt;hibernate-ehcache&lt;/artifactId&gt;
                     &lt;version&gt;3.5.0-Final&lt;/version&gt;
                 &lt;/dependency&gt;
  </code></pre>
  
  <p>Any suggestions?
  Thank you!</p>