简体   繁体   English

尝试加载infinispan配置文件时出现FileNotFound异常

[英]FileNotFound exception while trying to load infinispan configuration file

I am trying to configure infinispan with Hibernate Search. 我正在尝试使用Hibernate Search配置infinispan。 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: 使用默认配置,它可以正常工作,但是我需要使用它的缓存管理器,因此需要将infinispan配置文件配置为:

hibernate.search.infinispan.configuration_resourcename=infinispan.xml

But it's giving FileNotFound exception as follows: 但是它给FileNotFound异常如下:

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. 如果有人对使用休眠搜索配置infinispan缓存管理器有任何想法,可以指导我吗?

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. 属性hibernate.search.infinispan.configuration_resourcename用于打开配置资源,因此它必须位于类路径上或作为资源包含在项目中。

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. 然后, infinispan.xml资源应位于项目资源的根文件夹中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 尝试创建文件时出现FileNotFound异常 - I'm getting FileNotFound exception while trying to create a file 尝试写入文件时出现FileNotFound异常 - FileNotFound exception when trying to write to a file FileNotFound读取excel文件时出现异常 - FileNotFound Exception while reading excel file 尝试从applicationcontext.xml提取bean时发生FileNotFound异常 - FileNotFound Exception while trying to extract bean from applicationcontext.xml 尝试在Android中打开Excel文件时不断收到FileNotFound异常 - Keep getting FileNotFound Exception when trying to open an excel file in Android 文件夹中的文件,但filenotfound异常 - file in folder but filenotfound exception 尝试使用getServletContext()。getRealPath()读取文件时,FileNotFound异常 - FileNotFound Exception When Trying To Read File Using getServletContext().getRealPath() 尝试从资源获取文件时出现FileNotFound异常 - FileNotFound exception when trying to get File from resource 从资源目录读取文件时FileNotFound异常 - FileNotFound Exception while reading file from resource directory 在Spring中的构造函数参数中从类路径读取文件时出现FileNotFound异常 - FileNotFound exception while reading file from classpath in constructor argument in Spring
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM