{"action":"created","issue":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/4418","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/4418/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/4418/comments","events_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/4418/events","html_url":"https://github.com/spring-projects/spring-boot/issues/4418","id":115983423,"number":4418,"title":"JCache with Infinispan doesnt work","user":{"login":"tollrakesh","id":9000987,"avatar_url":"https://avatars.githubusercontent.com/u/9000987?v=3","gravatar_id":"","url":"https://api.github.com/users/tollrakesh","html_url":"https://github.com/tollrakesh","followers_url":"https://api.github.com/users/tollrakesh/followers","following_url":"https://api.github.com/users/tollrakesh/following{/other_user}","gists_url":"https://api.github.com/users/tollrakesh/gists{/gist_id}","starred_url":"https://api.github.com/users/tollrakesh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tollrakesh/subscriptions","organizations_url":"https://api.github.com/users/tollrakesh/orgs","repos_url":"https://api.github.com/users/tollrakesh/repos","events_url":"https://api.github.com/users/tollrakesh/events{/privacy}","received_events_url":"https://api.github.com/users/tollrakesh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spring-projects/spring-boot/labels/waiting-for-feedback","name":"waiting-for-feedback","color":"fef2c0"}],"state":"open","locked":false,"assignee":{"login":"snicoll","id":490484,"avatar_url":"https://avatars.githubusercontent.com/u/490484?v=3","gravatar_id":"","url":"https://api.github.com/users/snicoll","html_url":"https://github.com/snicoll","followers_url":"https://api.github.com/users/snicoll/followers","following_url":"https://api.github.com/users/snicoll/following{/other_user}","gists_url":"https://api.github.com/users/snicoll/gists{/gist_id}","starred_url":"https://api.github.com/users/snicoll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snicoll/subscriptions","organizations_url":"https://api.github.com/users/snicoll/orgs","repos_url":"https://api.github.com/users/snicoll/repos","events_url":"https://api.github.com/users/snicoll/events{/privacy}","received_events_url":"https://api.github.com/users/snicoll/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-11-09T22:36:46Z","updated_at":"2015-11-10T14:03:03Z","closed_at":null,"body":"Hi,\r\n\r\nWhen I create the infinispan.xml file in my resources directory, and specify `spring.cache.infinispan.config=infinispan.xml` the code doesnt work when packaged as jar (I'm using Infinispan 7.2.5) because the below code gets invoked from `org.infinispan.commons.util.AbstractFileLookup`.\r\n\r\n\t   @Override\r\n\t   public InputStream lookupFileStrict(URI uri, ClassLoader cl) throws FileNotFoundException {\r\n\t\t  return new FileInputStream(new File(uri));\r\n\t   }\r\n\r\nThis is because Spring Boot passes the URI. But, Infinispan doesnt use the classloader to load from URI.\r\n\r\nIf I create an override as below, it works\r\n\r\n\t\t@Override\r\n\t\tpublic InputStream lookupFileStrict(URI uri, ClassLoader cl) throws FileNotFoundException {\r\n\t\t\treturn lookupFileStrict(\"infinispan.xml\",cl);\r\n\t\t   /* return new FileInputStream(new File(uri));*/\r\n\t\t}\r\n\r\nSo, either Spring Boot would have to just pass the filename instead of URI, along with the classLoader or there must be a bug Infinispan which would have it use the classloader for URI."},"comment":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/comments/155427993","html_url":"https://github.com/spring-projects/spring-boot/issues/4418#issuecomment-155427993","issue_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/4418","id":155427993,"user":{"login":"snicoll","id":490484,"avatar_url":"https://avatars.githubusercontent.com/u/490484?v=3","gravatar_id":"","url":"https://api.github.com/users/snicoll","html_url":"https://github.com/snicoll","followers_url":"https://api.github.com/users/snicoll/followers","following_url":"https://api.github.com/users/snicoll/following{/other_user}","gists_url":"https://api.github.com/users/snicoll/gists{/gist_id}","starred_url":"https://api.github.com/users/snicoll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snicoll/subscriptions","organizations_url":"https://api.github.com/users/snicoll/orgs","repos_url":"https://api.github.com/users/snicoll/repos","events_url":"https://api.github.com/users/snicoll/events{/privacy}","received_events_url":"https://api.github.com/users/snicoll/received_events","type":"User","site_admin":false},"created_at":"2015-11-10T14:03:03Z","updated_at":"2015-11-10T14:03:03Z","body":"Ah, JCache I see, thanks. well I am using what the spec tells me to do (I think) so I am not sure I could do anything about it, really. I'll have a look at the API and how I could eventually workaround it\r\n\r\nYour key is useless then, the JCache support is kicking in so it only reads `spring.cache.jcache.*`\r\n\r\nCan you maybe add `spring.cache.type=infinispan` to your config to force the native support rather than the JSR-107 one?"}}