Lucee 5 Unable to load class org.lucee.extension.cache.eh.LuceeRMICacheReplicatorFactory

Lucee Lucee 5.2.1.8, tomcat Apache Tomcat/8.5.11, java 1.8.0_121 (Oracle Corporation) 64bit, windows 2012

I receive these errors in the administrator when I verify 2 different distributed cache. I have Ehcache V 2.10.0.21 installed.

  1. Unable to load class org.lucee.extension.cache.eh.LuceeRMICacheReplicatorFactory. Initial cause was org.lucee.extension.cache.eh.LuceeRMICacheReplicatorFactory not found by org.lucee.ehcache [70]

  2. java.lang.IllegalStateException: You cannot share a Configuration instance across multiple running CacheManager instances

The first cache:

this.cache.connections["EhClientCache"] = {
	  class: 'org.lucee.extension.cache.eh.EHCache'
	, bundleName: 'ehcache.extension'
	, bundleVersion: '2.10.0.21'
	, storage: true
	, custom: {
		"bootstrapAsynchronously":"true",
		"replicatePuts":"true",
		"automatic_hostName":"",
		"bootstrapType":"on",
		"maxelementsinmemory":"10000",
		"manual_rmiUrls":"",
		"distributed":"automatic",
		"automatic_multicastGroupAddress":"224.0.0.0",
		"memoryevictionpolicy":"LRU",
		"replicatePutsViaCopy":"true",
		"timeToIdleSeconds":"7200",
		"maximumChunkSizeBytes":"5000000",
		"automatic_multicastGroupPort":"4446",
		"listener_socketTimeoutMillis":"120000",
		"timeToLiveSeconds":"7200",
		"diskpersistent":"true",
		"manual_addional":"",
		"replicateRemovals":"true",
		"replicateUpdatesViaCopy":"true",
		"automatic_addional":"",
		"overflowtodisk":"true",
		"replicateAsynchronously":"true",
		"maxelementsondisk":"10000000",
		"listener_remoteObjectPort":"",
		"asynchronousReplicationIntervalMillis":"1000",
		"listener_hostName":"",
		"replicateUpdates":"true",
		"manual_hostName":"",
		"automatic_timeToLive":"the same subnet",
		"listener_port":""
	}
	, default: ''
};

I get error:

Unable to load class org.lucee.extension.cache.eh.LuceeRMICacheReplicatorFactory. Initial cause was org.lucee.extension.cache.eh.LuceeRMICacheReplicatorFactory not found by org.lucee.ehcache [70]

The second cache:

this.cache.connections["ehobjectcache"] = {
	  class: 'org.lucee.extension.cache.eh.EHCache'
	, bundleName: 'ehcache.extension'
	, bundleVersion: '2.10.0.21'
	, storage: false
	, custom: {
		"bootstrapAsynchronously":"true",
		"replicatePuts":"true",
		"automatic_hostName":"",
		"bootstrapType":"on",
		"maxelementsinmemory":"10000",
		"manual_rmiUrls":"",
		"distributed":"automatic",
		"automatic_multicastGroupAddress":"224.0.0.0",
		"memoryevictionpolicy":"LRU",
		"replicatePutsViaCopy":"true",
		"timeToIdleSeconds":"86400",
		"maximumChunkSizeBytes":"5000000",
		"automatic_multicastGroupPort":"4446",
		"listener_socketTimeoutMillis":"120000",
		"timeToLiveSeconds":"86400",
		"diskpersistent":"true",
		"manual_addional":"",
		"replicateRemovals":"true",
		"replicateUpdatesViaCopy":"true",
		"automatic_addional":"",
		"overflowtodisk":"true",
		"replicateAsynchronously":"true",
		"maxelementsondisk":"10000000",
		"listener_remoteObjectPort":"",
		"asynchronousReplicationIntervalMillis":"1000",
		"listener_hostName":"",
		"replicateUpdates":"true",
		"manual_hostName":"",
		"automatic_timeToLive":"the same subnet",
		"listener_port":""
	}
	, default: ''
};

I get the error:

java.lang.IllegalStateException: You cannot share a Configuration instance across multiple running CacheManager instances

If I downgrade to 2.10.0.18 I then I receive java.lang.NullPointerException

I did a global find for ehcache in the lucee-server directory and found that the ehcache.extension-2.10.0.21.jar is defined in multiple bundles.info files. Not sure if that is a problem.

C:\Sites\lucee\tomcat\lucee-server\felix-cache\bundle70\bundle.info:
C:\Sites\lucee\tomcat\lucee-server\felix-cache\bundle84\bundle.info:
C:\Sites\lucee\tomcat\lucee-server\felix-cache\bundle94\bundle.info:
    1  94
    2: C:\Sites\lucee\tomcat\lucee-server\bundles\ehcache.extension-2.10.0.21.jar
    3  32
    4  1

I could not find any errors related to ehcache apart form what the admin cache check displayed.

Also, I would like to add that I just did a brand new install using lucee-5.1.3.018-pl0-windows-installer.exe and updated to the latest lucee and ehcache and the issue exists so I doubt it is anything that I may have changed in tomcat or contexts.

this is the wrong place for reporting a ticket, please use http://issues.lucee.org instead.

We have a couple of test cases testing EHCache that passing sucessfully with every commit.
So we have to find out what exactly is the reason this is not working, so we will start with a testcase that shows the issue. Please make sure to attach the full java stacktrace to the ticket created.