solr
我试图在使用apache tomcat 7
on时进行多核设置windows 8
。solr 主页打开,但没有出现核心。我检查了日志记录部分,出现以下错误:
org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Error Instantiating SearchComponent, solr.clustering.ClusteringComponent failed to instantiate org.apache.solr.handler.component.SearchComponent
这是我尝试添加 collection1(默认核心)时的堆栈跟踪:
SolrCore 'collection1' is not available due to init failure: Error loading class 'solr.clustering.ClusteringComponent',trace=org.apache.solr.common.SolrException: SolrCore 'collection1' is not available due to init failure: Error loading class 'solr.clustering.ClusteringComponent' at org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:785) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:295) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:195) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1852) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: org.apache.solr.common.SolrException: Error loading class 'solr.clustering.ClusteringComponent' at org.apache.solr.core.SolrCore.<init>(SolrCore.java:834) at org.apache.solr.core.SolrCore.<init>(SolrCore.java:625) at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:524) at org.apache.solr.core.CoreContainer.create(CoreContainer.java:559) at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:249) at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:241) 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) ... 3 more Caused by: org.apache.solr.common.SolrException: Error loading class 'solr.clustering.ClusteringComponent' at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:449) at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:381) at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:526) at org.apache.solr.core.SolrCore.createInitInstance(SolrCore.java:582) at org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:2128) at org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:2122) at org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:2155) at org.apache.solr.core.SolrCore.loadSearchComponents(SolrCore.java:1177) at org.apache.solr.core.SolrCore.<init>(SolrCore.java:762) ... 11 more Caused by: java.lang.ClassNotFoundException: solr.clustering.ClusteringComponent at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.net.FactoryURLClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:433) ... 19 more ,code=500}
我已经在 stackoverflow 中提到了Tomcat SOLR 多核设置,但没有帮助。另外,浏览了帖子中给出的博客链接,但又没用了。
堆栈跟踪如下:
org.apache.solr.common.SolrException: Error Instantiating SearchComponent, solr.clustering.ClusteringComponent failed to instantiate org.apache.solr.handler.component.SearchComponent
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:834)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:625)
at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:524)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:559)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:249)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:241)
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)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.solr.common.SolrException: Error Instantiating SearchComponent, solr.clustering.ClusteringComponent failed to instantiate org.apache.solr.handler.component.SearchComponent
at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:547)
at org.apache.solr.core.SolrCore.createInitInstance(SolrCore.java:582)
at org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:2128)
at org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:2122)
at org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:2155)
at org.apache.solr.core.SolrCore.loadSearchComponents(SolrCore.java:1177)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:762)
... 11 more
Caused by: java.lang.ClassCastException: class org.apache.solr.handler.clustering.ClusteringComponent
at java.lang.Class.asSubclass(Unknown Source)
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:443)
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:381)
at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:526)
这是我的 Solr.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
All (relative) paths are relative to the installation path
persistent: Save changes made via the API to this file
sharedLib: path to a lib directory that will be shared across all cores
-->
<solr persistent="true">
<!--
adminPath: RequestHandler path to manage cores.
If 'null' (or absent), cores will not be manageable via request handler
-->
<cores adminPath="/admin/cores">
<core name="core0" instanceDir="core0"/>
<core name="core1" instanceDir="core1"/>
<!--<core name="collection1" instanceDir="collection1"/>-->
</cores>
</solr>
更新的问题: solrconfig.xml
<lib dir="C:/Users/admin/Desktop/solr/solr-4.5.0/solr-4.5.0/contrib/extraction/lib" regex=".*\.jar" />
<lib dir="C:/Users/admin/Desktop/solr/solr-4.5.0/solr-4.5.0/dist/" regex="solr-cell-\d.*\.jar" />
<lib dir="C:/Users/admin/Desktop/solr/solr-4.5.0/solr-4.5.0/contrib/clustering/lib/" regex=".*\.jar" />
<lib dir="C:/Users/admin/Desktop/solr/solr-4.5.0/solr-4.5.0/dist/" regex="solr-clustering-\d.*\.jar" />
<lib dir="C:/Users/admin/Desktop/solr/solr-4.5.0/solr-4.5.0/contrib/langid/lib/" regex=".*\.jar" />
<lib dir="C:/Users/admin/Desktop/solr/solr-4.5.0/solr-4.5.0/dist/" regex="solr-langid-\d.*\.jar" />
<lib dir="C:/Users/admin/Desktop/solr/solr-4.5.0/solr-4.5.0/contrib/velocity/lib" regex=".*\.jar" />
<lib dir="C:/Users/admin/Desktop/solr/solr-4.5.0/solr-4.5.0/dist/" regex="solr-velocity-\d.*\.jar" />