I'm getting the following exception from the CIL in my DD4T 2 Java project that has been upgraded to Web 8.5

Could not create CONTENT service client. Error:Unable to load content service url!

Digging into the logs I found the exception to be:

2017-05-19 15:15:27,965 WARN BaseClientConfigurationLoader - Unable to resolve ContentServiceCapability using DiscoveryService: http://stg-discovery:8082/discovery.svc. javax.cache.CacheException: Multiple CachingProviders have been configured when only a single CachingProvider is expected at javax.cache.Caching$CachingProviderRegistry.getCachingProvider(Caching.java:376) ~[cache-api-1.0.0.jar:na] at javax.cache.Caching$CachingProviderRegistry.getCachingProvider(Caching.java:351) ~[cache-api-1.0.0.jar:na] at javax.cache.Caching.getCachingProvider(Caching.java:142) ~[cache-api-1.0.0.jar:na] at com.sdl.web.client.cache.GeneralCacheProvider.getCacheManager(GeneralCacheProvider.java:138) ~[discovery-client-lightweight-8.5.0-1014.jar:8.5.0-1014]

I'm not sure where these Caching providers are configured.

I've tried adding a few things to my application.properties to hint using the EhCache provider.

Is something in DD4T 2 conflicting with the CIL here? Or am I barking up the wrong tree?

Edit: I've tried setting the DD4T cache provider to the NoCacheProvider but it's not helped.

Edit: Seems like this is caused by 2 versions of Ehcache. Still trying to figure out how to fix the dependencies to work together.

  • I think this is caused by Web 8.5 having moved to ehcache-3.1.3, which has the jcache implementation inside it, whereas in previous versions, you needed to have ehcache-2.x + jcache-1.0.1.jar. If you remove jcache-1.0.1 it should work. – Raimond May 22 '17 at 6:30
  • Hi Rai, that looked like it was going to work but it seems like the org.dd4t.core.providers.EHCacheProvider class has a hard dependency on the EH Cache 2.0 namespace. I tried the NoCacheProvider but it was broken in 2.0.10. I've now got my own NoCacheProvider version and it does work. Thanks for your help! – Rob Stevenson-Leggett May 22 '17 at 15:37
  • Ok - seen the issue come in. I'll have a look later in the week. – Raimond May 22 '17 at 15:39
  • It looks like it's fixed in your refactoring of the caching recently. – Rob Stevenson-Leggett May 22 '17 at 16:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.