Fixing a strange Ehcache issue in CF9
2 September 2014
Working on an ORM app on my dev machine earlier I suddenly found myself unable to make any requests to the app - nor indeed to any of my other ORM apps - without getting the following error:
net.sf.ehcache.CacheException: error setting options
The problem appeared to start immediately after I corrected a syntax error in a base ORM Entity which had caused a parsing exception.
Blog posts by Rob Brooks-Bilson and Hemant Khandelwal both suggested this was a bug triggered in Ehcache when there is no active internet connection, but I was fully connected.
Cycling my internet connection didn't help, nor did restarting ColdFusion.
What did work was following Hemant's suggestion to comment out the following two items from [cfroot]/lib/ehcache.xml
<cacheManagerPeerProviderFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
properties="peerDiscovery=automatic,
multicastGroupAddress=230.0.0.1,
multicastGroupPort=4446, timeToLive=1"
propertySeparator=","
/>
<cacheManagerPeerListenerFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"/>