title: EhCache rmi replication issue in WebLogic cluster
body: <p>I am facing the ehcache replication issue while deploying the application into WebLogic 10.3.6.
  Application is not starting and throwing the below exception:</p>
  
  <pre><code>org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ehCacheManager' defined in class path resource [xxxxx.xml]: Invocation of init method failed; nested exception is net.sf.ehcache.CacheException: Problem starting listener for RMICachePeer //xxxx:xxxx/myCache. Initial cause was RemoteException occurred in server thread; nested exception is: 
      java.rmi.AccessException: Registry.Registry.rebind disallowed; origin /x.x.x.x is non-local host
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
      ...
  
  Caused by: net.sf.ehcache.CacheException: Problem starting listener for RMICachePeer //xxxx:xxxx/myCache. Initial cause was RemoteException occurred in server thread; nested exception is: 
      java.rmi.AccessException: Registry.Registry.rebind disallowed; origin /x.x.x.x is non-local host
      at net.sf.ehcache.distribution.RMICacheManagerPeerListener.notifyCacheAdded(RMICacheManagerPeerListener.java:538)
      at net.sf.ehcache.event.CacheManagerEventListenerRegistry.notifyCacheAdded(CacheManagerEventListenerRegistry.java:159)
      at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:1118)
      at net.sf.ehcache.CacheManager.addConfiguredCaches(CacheManager.java:670)
      at net.sf.ehcache.CacheManager.init(CacheManager.java:372)
      at net.sf.ehcache.CacheManager.&lt;init&gt;(CacheManager.java:294)
      at org.springframework.cache.ehcache.EhCacheManagerFactoryBean.afterPropertiesSet(EhCacheManagerFactoryBean.java:104)   
      ...
  </code></pre>
  
  <p>EhCache configuration is as follows:</p>
  
  <pre><code>&lt;diskStore path="java.io.tmpdir/myCache" /&gt;
  
  &lt;cacheManagerPeerProviderFactory
      class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
      properties="peerDiscovery=manual,rmiUrls=//x.x.x.x:xxxx/myCache" /&gt;                              
  
  &lt;cacheManagerPeerListenerFactory
      class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
      properties="hostName=x.x.x.x,port=xxxx,socketTimeoutMillis=300000" /&gt;
  
  &lt;cache 
      name="myCache" 
      maxElementsInMemory="1000"
      eternal="false"
      overflowToDisk="false" 
      diskPersistent="false"
      timeToIdleSeconds="0" 
      timeToLiveSeconds="1000"
      memoryStoreEvictionPolicy="LRU"&gt;
      &lt;cacheEventListenerFactory 
          class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
          properties="replicatePuts=true,replicateUpdates=true,replicateRemovals=true,replicateUpdatesViaCopy=true,replicateAsynchronously=true" /&gt;
      &lt;bootstrapCacheLoaderFactory 
          class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory" /&gt;
  &lt;/cache&gt;
  </code></pre>
  
  <p>Appreciate any help.</p>