]
Sebastian Łaskawiec updated ISPN-5949:
--------------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request:
AbstractFileLookup.lookupFileStrict does not use specified
classloader
----------------------------------------------------------------------
Key: ISPN-5949
URL:
https://issues.jboss.org/browse/ISPN-5949
Project: Infinispan
Issue Type: Bug
Components: Core
Affects Versions: 8.0.1.Final, 7.2.5.Final, 8.1.0.Beta1
Reporter: Stéphane Nicoll
Assignee: Sebastian Łaskawiec
Fix For: 9.0.0.Alpha4, 9.0.0.Final
I am reporting this issue on behalf of a Spring Boot user that created [an issue in our
tracker|https://github.com/spring-projects/spring-boot/issues/4418].
Spring Boot creates a JCache manager using the standard API, passing a {{Classloader}} to
it. It's unclear at this point if we pass the proper classloader or not but it
doesn't matter that much at this point since the classloader argument is being ignored
by {{AbstractFileLookup.lookupFileStrict}}.
{noformat}
Caused by: java.lang.IllegalArgumentException: URI is not hierarchical
at java.io.File.<init>(File.java:418)
at
org.infinispan.commons.util.AbstractFileLookup.lookupFileStrict(AbstractFileLookup.java:63)
at
org.infinispan.jcache.embedded.JCacheManager.getConfigurationBuilderHolder(JCacheManager.java:98)
at org.infinispan.jcache.embedded.JCacheManager.<init>(JCacheManager.java:56)
at
org.infinispan.jcache.embedded.JCachingProvider.createCacheManager(JCachingProvider.java:46)
at
org.infinispan.jcache.AbstractJCachingProvider.getCacheManager(AbstractJCachingProvider.java:66)
at
org.springframework.boot.autoconfigure.cache.JCacheCacheConfiguration.createCacheManager(JCacheCacheConfiguration.java:97)
at
org.springframework.boot.autoconfigure.cache.JCacheCacheConfiguration.jCacheCacheManager(JCacheCacheConfiguration.java:80)
{noformat}
When not running as a fat jar (i.e. running the main class in the IDE), the code works as
expected (as the classloader does not matter in this case).