play.api.cache.EhCacheExistsException: An EhCache instance with name 'play' already exists. This usually indicates that multiple instances of a dependent component (e.g. a Play application) have been started at the same time. at play.api.cache.EhCacheModule.play$api$cache$EhCacheModule$$bindCache$1(Cache.scala:184): Binding(interface net.sf.ehcache.Ehcache qualified with QualifierInstance(@play.cache.NamedCache(value=play)) to ProviderTarget(play.api.cache.NamedEhCacheProvider@2dfe19e7)) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$1) while locating net.sf.ehcache.Ehcache annotated with @play.cache.NamedCache(value=play) at play.api.cache.EhCacheModule.play$api$cache$EhCacheModule$$bindCache$1(Cache.scala:185): Binding(interface play.api.cache.CacheApi qualified with QualifierInstance(@play.cache.NamedCache(value=play)) to ProviderTarget(play.api.cache.NamedCacheApiProvider@6f7b9e34)) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$1) while locating play.api.cache.CacheApi annotated with @play.cache.NamedCache(value=play) while locating play.api.cache.CacheApi for parameter 0 at play.cache.DefaultCacheApi.<init>(DefaultCacheApi.java:20)

Stack Overflow | Stephane | 4 months ago
  1. 0

    Play Framework: EhCache issue on every code hot compile

    Stack Overflow | 4 months ago | Stephane
    play.api.cache.EhCacheExistsException: An EhCache instance with name 'play' already exists. This usually indicates that multiple instances of a dependent component (e.g. a Play application) have been started at the same time. at play.api.cache.EhCacheModule.play$api$cache$EhCacheModule$$bindCache$1(Cache.scala:184): Binding(interface net.sf.ehcache.Ehcache qualified with QualifierInstance(@play.cache.NamedCache(value=play)) to ProviderTarget(play.api.cache.NamedEhCacheProvider@2dfe19e7)) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$1) while locating net.sf.ehcache.Ehcache annotated with @play.cache.NamedCache(value=play) at play.api.cache.EhCacheModule.play$api$cache$EhCacheModule$$bindCache$1(Cache.scala:185): Binding(interface play.api.cache.CacheApi qualified with QualifierInstance(@play.cache.NamedCache(value=play)) to ProviderTarget(play.api.cache.NamedCacheApiProvider@6f7b9e34)) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$1) while locating play.api.cache.CacheApi annotated with @play.cache.NamedCache(value=play) while locating play.api.cache.CacheApi for parameter 0 at play.cache.DefaultCacheApi.<init>(DefaultCacheApi.java:20)

    Root Cause Analysis

    1. play.api.cache.EhCacheExistsException

      An EhCache instance with name 'play' already exists. This usually indicates that multiple instances of a dependent component (e.g. a Play application) have been started at the same time. at play.api.cache.EhCacheModule.play$api$cache$EhCacheModule$$bindCache$1(Cache.scala:184): Binding(interface net.sf.ehcache.Ehcache qualified with QualifierInstance(@play.cache.NamedCache(value=play)) to ProviderTarget(play.api.cache.NamedEhCacheProvider@2dfe19e7)) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$1) while locating net.sf.ehcache.Ehcache annotated with @play.cache.NamedCache(value=play) at play.api.cache.EhCacheModule.play$api$cache$EhCacheModule$$bindCache$1(Cache.scala:185): Binding(interface play.api.cache.CacheApi qualified with QualifierInstance(@play.cache.NamedCache(value=play)) to ProviderTarget(play.api.cache.NamedCacheApiProvider@6f7b9e34)) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$1) while locating play.api.cache.CacheApi annotated with @play.cache.NamedCache(value=play) while locating play.api.cache.CacheApi for parameter 0 at play.cache.DefaultCacheApi.<init>(DefaultCacheApi.java:20)

      at play.cache.DefaultCacheApi.class()
    2. Play Cache
      DefaultCacheApi.class
      1. play.cache.DefaultCacheApi.class(DefaultCacheApi.java:20)
      1 frame