我正在尝试集成apache tomcat(版本7)和solr(版本4),但出现此错误:

HTTP Status 500 - {msg=SolrCore 'collection1' is not available due to init failure:
The filename, directory name, or volume label syntax is incorrect,
trace=org.apache.solr.common.SolrException: SolrCore 'collection1' is not available due to init failure: The filename, directory name, or volume label syntax is incorrect at
org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:1212) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:248) at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:155) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218) at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956) at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:442) at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1082) at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:623) at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) at
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at
java.lang.Thread.run(Unknown Source) Caused by:

org.apache.solr.common.SolrException: The filename, directory name, or volume label syntax is incorrect at
org.apache.solr.core.SolrCore.<init>(SolrCore.java:821) at
org.apache.solr.core.SolrCore.<init>(SolrCore.java:618) at
org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:949) at
org.apache.solr.core.CoreContainer.create(CoreContainer.java:984) at
org.apache.solr.core.CoreContainer$2.call(CoreContainer.java:597) at
org.apache.solr.core.CoreContainer$2.call(CoreContainer.java:592) at
java.util.concurrent.FutureTask.run(Unknown Source) at
java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at
java.util.concurrent.FutureTask.run(Unknown Source) at
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor
$Worker.run(Unknown Source) ... 1 more

Caused by: java.io.IOException: The filename, directory name, or volume label syntax is incorrect at
java.io.WinNTFileSystem.canonicalize0(Native Method) at java.io.Win32FileSystem.canonicalize(Unknown Source)
at java.io.File.getCanonicalPath(Unknown Source) at
org.apache.solr.core.StandardDirectoryFactory.normalize(StandardDirectoryFactory.java:47)
at org.apache.solr.core.SolrCore.initIndex(SolrCore.java:462) at
org.apache.solr.core.SolrCore.<init>(SolrCore.java:745) ... 11 more ,code=500}


请帮我解决!

最佳答案

转到Solrconfig.xml,将有一个称为数据目录的标记,因此只需尝试对所需的路径进行硬编码,如果可行,则可以得出结论,这是问题的根本原因。

关于java - 集成apache tomcat和solr,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/38007771/

10-10 03:11