title: Issue setting up solr multi-core using apache tomcat 7 on windows 8
body: <p>I was trying to do multi core setup in <code>solr</code> using <code>apache tomcat 7</code> on <code>windows 8</code>. The solr home opens up , but no cores appear. I checked the logging section and there was the following error:</p>
  
  <pre><code> 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
  </code></pre>
  
  <p>This is the stack trace when i try to add collection1(default core):</p>
  
  <pre><code>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.&lt;init&gt;(SolrCore.java:834) at org.apache.solr.core.SolrCore.&lt;init&gt;(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.&lt;init&gt;(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}
  </code></pre>
  
  <p>I have already referred <a href="https://stackoverflow.com/questions/2714046/tomcat-solr-multiple-cores-setup">Tomcat SOLR multiple cores setup</a> in stackoverflow, but was of no help. also , went through the blogs links given in the post but of no use again.</p>
  
  <p>The stack trace is as follows: </p>
  
  <pre><code>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.&lt;init&gt;(SolrCore.java:834)
      at org.apache.solr.core.SolrCore.&lt;init&gt;(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.&lt;init&gt;(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)
  </code></pre>
  
  <p><strong>Here is my Solr.xml</strong> </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  &lt;!--
   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.
  --&gt;
  
  &lt;!--
   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
  --&gt;
  &lt;solr persistent="true"&gt;
  
    &lt;!--
    adminPath: RequestHandler path to manage cores.  
      If 'null' (or absent), cores will not be manageable via request handler
    --&gt;
    &lt;cores adminPath="/admin/cores"&gt;
      &lt;core name="core0" instanceDir="core0"/&gt;
      &lt;core name="core1" instanceDir="core1"/&gt;
      &lt;!--&lt;core name="collection1" instanceDir="collection1"/&gt;--&gt;
    &lt;/cores&gt; 
  &lt;/solr&gt;
  </code></pre>
  
  <p><strong>Updated question :</strong>
     <strong>solrconfig.xml</strong></p>
  
  <pre><code>&lt;lib dir="C:/Users/admin/Desktop/solr/solr-4.5.0/solr-4.5.0/contrib/extraction/lib" regex=".*\.jar" /&gt;
   &lt;lib dir="C:/Users/admin/Desktop/solr/solr-4.5.0/solr-4.5.0/dist/" regex="solr-cell-\d.*\.jar" /&gt;
  
   &lt;lib dir="C:/Users/admin/Desktop/solr/solr-4.5.0/solr-4.5.0/contrib/clustering/lib/" regex=".*\.jar" /&gt;
   &lt;lib dir="C:/Users/admin/Desktop/solr/solr-4.5.0/solr-4.5.0/dist/" regex="solr-clustering-\d.*\.jar" /&gt;
  
   &lt;lib dir="C:/Users/admin/Desktop/solr/solr-4.5.0/solr-4.5.0/contrib/langid/lib/" regex=".*\.jar" /&gt;
   &lt;lib dir="C:/Users/admin/Desktop/solr/solr-4.5.0/solr-4.5.0/dist/" regex="solr-langid-\d.*\.jar" /&gt;
  
   &lt;lib dir="C:/Users/admin/Desktop/solr/solr-4.5.0/solr-4.5.0/contrib/velocity/lib" regex=".*\.jar" /&gt;
   &lt;lib dir="C:/Users/admin/Desktop/solr/solr-4.5.0/solr-4.5.0/dist/" regex="solr-velocity-\d.*\.jar" /&gt;
  </code></pre>