'DependencyException: Failed to find provider with satisfied dependency set for interface org.ehcache.core.spi.store.Store

I have an app that uses EHCache, it worked when using Payara Application server version 1.0.5 but after upgrading to 1.1.0 it started breaking.

Here's a snippet of the code:

persistentEntityStoreCacheManager 
    = CacheManagerBuilder.newCacheManagerBuilder().withCache("defaultPersistentEntityStoreCache",
                      CacheConfigurationBuilder.newCacheConfigurationBuilder(String.class, PersistentEntityStore.class, ResourcePoolsBuilder.heap(100)).build()).build(true);

And it is throwing this error:

java.lang.IllegalStateException: org.ehcache.core.spi.ServiceLocator$DependencyException: Failed to find provider with satisfied dependency set for interface org.ehcache.core.spi.store.Store$Provider [ca
ndidates []]
        at org.ehcache.core.spi.ServiceLocator$DependencySet.build(ServiceLocator.java:350)
        at org.ehcache.core.EhcacheManager.resolveServices(EhcacheManager.java:154)
        at org.ehcache.core.EhcacheManager.<init>(EhcacheManager.java:125)
        at org.ehcache.core.EhcacheManager.<init>(EhcacheManager.java:115)
        at org.ehcache.core.EhcacheManager.<init>(EhcacheManager.java:111)
        at org.ehcache.config.builders.CacheManagerBuilder.newCacheManager(CacheManagerBuilder.java:117)
        at org.ehcache.config.builders.CacheManagerBuilder.build(CacheManagerBuilder.java:73)

What's this EHCache and and what could be missing here?



Solution 1:[1]

In my case, there are multiple EhCache imported by different modules.After useing the same version of EhCache. The problem solved.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 tony