简体   繁体   中英

FileNotFound exception while trying to load infinispan configuration file

I am trying to configure infinispan with Hibernate Search. It's working fine with default configuration, but I need to use a Cache Manager with it and therefore need to configure infinispan configuration file as:

hibernate.search.infinispan.configuration_resourcename=infinispan.xml

But it's giving FileNotFound exception as follows:

caused by: org.hibernate.search.SearchException: Could not start Infinispan CacheManager using as configuration file: infinispan.xml
    at org.hibernate.search.infinispan.CacheManagerServiceProvider.start(CacheManagerServiceProvider.java:101)
    at org.hibernate.search.engine.impl.StandardServiceManager$ServiceProviderWrapper.startVirtual(StandardServiceManager.java:181)
    at org.hibernate.search.engine.impl.StandardServiceManager.requestService(StandardServiceManager.java:125)
    at org.hibernate.search.infinispan.impl.InfinispanDirectoryProvider.initialize(InfinispanDirectoryProvider.java:97)
    at org.hibernate.search.store.impl.DirectoryProviderFactory.createDirectoryProvider(DirectoryProviderFactory.java:88)
    ... 74 more
Caused by: java.io.FileNotFoundException: infinispan.xml
    at org.hibernate.search.infinispan.impl.InfinispanConfigurationParser.parseFile(InfinispanConfigurationParser.java:75)
    at org.hibernate.search.infinispan.CacheManagerServiceProvider.start(CacheManagerServiceProvider.java:96)
    ... 78 more

Can someone guide me if they have any idea about configuring infinispan cache manager with hibernate search.

The property hibernate.search.infinispan.configuration_resourcename is meant to open a configuration resource so it must be on your classpath or included as a resource in your project.

Also remember that the value is interpreted as an absolute path to the resource, so if you have

hibernate.search.infinispan.configuration_resourcename=infinispan.xml

Then the infinispan.xml resource should be in the root folder of your project resources.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM