Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-5949

AbstractFileLookup.lookupFileStrict does not use specified classloader

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 9.0.0.Final
    • 7.2.5.Final, 8.2.3.Final
    • Core
    • None
    • Hide
      git clone git@github.com:snicoll-scratches/test-gh-4418.git
      cd test-gh-4418
      mvn package
      cd target
      java -jar demo-0.0.1-SNAPSHOT.jar
      
      Show
      git clone git@github.com:snicoll-scratches/test-gh-4418.git cd test-gh-4418 mvn package cd target java -jar demo-0.0.1-SNAPSHOT.jar

      I am reporting this issue on behalf of a Spring Boot user that created an issue in our tracker.

      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.

      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)
      

      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).

              slaskawi@redhat.com Sebastian Łaskawiec (Inactive)
              stephane.nicoll Stéphane Nicoll (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: