Error in custom provider, net.sf.ehcache.CacheException: Unable to load class net.sf.ehcache.store.DefaultElementValueComparator.

73 views
Skip to first unread message

Atiq Sayyed

unread,
Jun 21, 2016, 1:45:36 AM6/21/16
to play-framework
Hi,

we are trying to migrate from Play 2.3 to Play 2.4 but we've got this strange bug which we're not able to understand.

It happens sporadically and when we run tests we can easily reproduce this...

any help would be appreciated !!..


info] - should apply fallback if authentication service send erroneous response *** FAILED ***
[info]   com.google.inject.ProvisionException: Unable to provision, see the following errors:
[info]
[info] 1) Error in custom provider, net.sf.ehcache.CacheException: Unable to load class net.sf.ehcache.store.DefaultElementValueComparator. Initial cause was net.sf.ehcache.store.DefaultElementValueComparator.<init>(net.sf.ehcache.config.CacheConfiguration)
[info]   at play.api.cache.EhCacheModule.play$api$cache$EhCacheModule$$bindCache$1(Cache.scala:178):
[info] Binding(interface net.sf.ehcache.Ehcache qualified with QualifierInstance(@play.cache.NamedCache(value=play)) to ProviderTarget(play.api.cache.NamedEhCacheProvider@ad569c8)) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$1)
[info]   while locating net.sf.ehcache.Ehcache annotated with @play.cache.NamedCache(value=play)
[info]   at play.api.cache.EhCacheModule.play$api$cache$EhCacheModule$$bindCache$1(Cache.scala:179):
[info] Binding(interface play.api.cache.CacheApi qualified with QualifierInstance(@play.cache.NamedCache(value=play)) to ProviderTarget(play.api.cache.NamedCacheApiProvider@44b66a36)) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$1)
[info]   while locating play.api.cache.CacheApi annotated with @play.cache.NamedCache(value=play)
[info]   while locating play.api.cache.CacheApi
[info]
[info] 1 error
[info]   at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1025)
[info]   at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1051)
[info]   at play.api.inject.guice.GuiceInjector.instanceOf(GuiceInjectorBuilder.scala:321)
[info]   at play.api.inject.guice.GuiceInjector.instanceOf(GuiceInjectorBuilder.scala:316)
[info]   at play.api.Application$$anonfun$instanceCache$1.apply(Application.scala:235)
[info]   at play.api.Application$$anonfun$instanceCache$1.apply(Application.scala:235)
[info]   at play.utils.InlineCache.fresh(InlineCache.scala:69)
[info]   at play.utils.InlineCache.apply(InlineCache.scala:55)
[info]   at play.api.cache.Cache$.cacheApi(Cache.scala:62)
[info]   at play.api.cache.Cache$.getAs(Cache.scala:126)
[info]   ...
[info]   Cause: net.sf.ehcache.CacheException: Unable to load class net.sf.ehcache.store.DefaultElementValueComparator. Initial cause was net.sf.ehcache.store.DefaultElementValueComparator.<init>(net.sf.ehcache.config.CacheConfiguration)
[info]   at net.sf.ehcache.util.ClassLoaderUtil.createNewInstance(ClassLoaderUtil.java:100)
[info]   at net.sf.ehcache.config.ElementValueComparatorConfiguration.createElementComparatorInstance(ElementValueComparatorConfiguration.java:57)
[info]   at net.sf.ehcache.Cache.clone(Cache.java:2815)
[info]   at net.sf.ehcache.Cache.clone(Cache.java:163)
[info]   at net.sf.ehcache.CacheManager.cloneDefaultCache(CacheManager.java:1875)
[info]   at net.sf.ehcache.CacheManager.addCache(CacheManager.java:1173)
[info]   at play.api.cache.NamedEhCacheProvider.get$lzycompute(Cache.scala:208)
[info]   at play.api.cache.NamedEhCacheProvider.get(Cache.scala:207)
[info]   at play.api.cache.NamedEhCacheProvider.get(Cache.scala:205)
[info]   at com.google.inject.util.Providers$GuicifiedProvider.get(Providers.java:119)
[info]   ...
[info]   Cause: java.lang.NoSuchMethodException: net.sf.ehcache.store.DefaultElementValueComparator.<init>(net.sf.ehcache.config.CacheConfiguration)
[info]   at java.lang.Class.getConstructor0(Class.java:3074)
[info]   at java.lang.Class.getConstructor(Class.java:1817)
[info]   at net.sf.ehcache.util.ClassLoaderUtil.createNewInstance(ClassLoaderUtil.java:91)
[info]   at net.sf.ehcache.config.ElementValueComparatorConfiguration.createElementComparatorInstance(ElementValueComparatorConfiguration.java:57)
[info]   at net.sf.ehcache.Cache.clone(Cache.java:2815)
[info]   at net.sf.ehcache.Cache.clone(Cache.java:163)
[info]   at net.sf.ehcache.CacheManager.cloneDefaultCache(CacheManager.java:1875)
[info]   at net.sf.ehcache.CacheManager.addCache(CacheManager.java:1173)
[info]   at play.api.cache.NamedEhCacheProvider.get$lzycompute(Cache.scala:208)
[info]   at play.api.cache.NamedEhCacheProvider.get(Cache.scala:207)
[info]   ...
Reply all
Reply to author
Forward
0 new messages