aspose file tools*
The moose likes EhCache and the fly likes Error during CacheManager initialization for distributed ehcache implementation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Caching » EhCache
Bookmark "Error during CacheManager initialization for distributed ehcache implementation" Watch "Error during CacheManager initialization for distributed ehcache implementation" New topic
Author

Error during CacheManager initialization for distributed ehcache implementation

Jacques Karels
Greenhorn

Joined: Sep 24, 2008
Posts: 1
I am using ehcache for short term caching of objects. This all worked very well until I implemented a single node cluster on Weblogic 8.1/1.4.2 JDK and adjusted the ehcache configuration to work on a distributed environment. Many searches have offered nothing for the particular error that I am getting - thus troubleshooting has been a bit of a hurdle. Below is the relevant portion of the stack and the bulk of my ehcache.xml file. Also, worth noting is this failure occurs using both ehcache 1.2.3 and 1.5.0. Any insight or suggestions welcome.

Stack:
net.sf.ehcache.CacheException: Problem starting listener for RMICachePeer //172.26.184.60:3344/sessionIdCache. Initial c
ause was no such object in table
at net.sf.ehcache.distribution.RMICacheManagerPeerListener.notifyCacheAdded(RMICacheManagerPeerListener.java:513
)
at net.sf.ehcache.event.CacheManagerEventListenerRegistry.notifyCacheAdded(CacheManagerEventListenerRegistry.jav
a:156)
at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:720)
at net.sf.ehcache.CacheManager.addConfiguredCaches(CacheManager.java:368)
at net.sf.ehcache.CacheManager.init(CacheManager.java:235)
at net.sf.ehcache.CacheManager.<init>(CacheManager.java:213)

ehcache.xml
<code>
...
<cacheManagerEventListenerFactory class="" properties=""/>

<cacheManagerPeerProviderFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
properties="peerDiscovery=automatic,
multicastGroupAddress=${ehcache_multi_cast_group_address},
multicastGroupPort=${ehcache_multi_cast_group_port}, timeToLive=${ehcache_time_to_live}" />

<cacheManagerPeerListenerFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
properties="port=${ehcache_multi_cast_group_port},socketTimeoutMillis=120000" />

<defaultCache
maxElementsInMemory="1"
eternal="false"
timeToIdleSeconds="1"
timeToLiveSeconds="1"
overflowToDisk="false"
diskPersistent="false"
memoryStoreEvictionPolicy="LRU" />

<cache name="sessionIdCache"
maxElementsInMemory="10000"
eternal="false"
overflowToDisk="false"
timeToIdleSeconds="180"
timeToLiveSeconds="180"
memoryStoreEvictionPolicy="LFU">
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
properties="replicateAsynchronously=true,
replicatePuts=true,
replicateUpdates=true,
replicateUpdatesViaCopy=true,
replicateRemovals=true" />
</cache>
...
</code>

Using multicast address of 230.0.0.1 on port 40001. WLS cluster does NOT use the same multicast address and port (though I did try it...)

Doesn't seem to matter as the port in the error on the stack changes every time I deploy and test (i.e. 3344 as above).

Again, any help is welcome here - really do not want to have to implement a different cache - of course, I am open to suggestions right about now.

Thanks a bunch!
Jacques


I had three pieces of limestone on my desk...
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19790
    
  20

I;m going to move this to the Other Open Source Projects forum since this is clearly a ehcache problem, not a Java problem per se.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error during CacheManager initialization for distributed ehcache implementation