title: Apache solr returns error as Could not load config for solrconfig.xml
body: <p>I followed <a href="http://www.cabotsolutions.com/2009/05/using-solr-lucene-for-full-text-search-with-mysql-db/" rel="nofollow noreferrer">this</a> tutorial for solr searching.</p>
  
  <p>I did all 5 steps in that tutorial. But after that I loaded the solr as:</p>
  
  <p><code>http://localhost:8983/solr/admin</code> then I got this error.</p>
  
  <pre><code>Problem accessing /solr/admin. Reason:
  
      {msg=SolrCore 'collection1' is not available due to init failure: Could not load config for solrconfig.xml,trace=org.apache.solr.common.SolrException: SolrCore 'collection1' is not available due to init failure: Could not load config for solrconfig.xml
      at org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:860)
      at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:251)
      at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:158)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
      at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
      at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
      at org.eclipse.jetty.server.Server.handle(Server.java:368)
      at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
      at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
      at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942)
      at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004)
      at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)
      at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
      at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
      at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
      at java.lang.Thread.run(Unknown Source)
  Caused by: org.apache.solr.common.SolrException: Could not load config for solrconfig.xml
      at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:592)
      at org.apache.solr.core.CoreContainer.create(CoreContainer.java:657)
      at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:364)
      at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:356)
      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      ... 1 more
  Caused by: org.apache.solr.common.SolrException: org.xml.sax.SAXParseException: The string "--" is not permitted within comments.
      at org.apache.solr.core.Config.&lt;init&gt;(Config.java:148)
      at org.apache.solr.core.Config.&lt;init&gt;(Config.java:86)
      at org.apache.solr.core.SolrConfig.&lt;init&gt;(SolrConfig.java:120)
      at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:589)
      ... 11 more
  Caused by: org.xml.sax.SAXParseException: The string "--" is not permitted within comments.
      at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
      at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanComment(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanComment(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
      at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
      at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
      at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
      at org.apache.solr.core.Config.&lt;init&gt;(Config.java:134)
      ... 14 more
  ,code=500}
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <p>REplaced the solrconfig.xml with new file...then i go tthis error:</p>
  
  <p>HTTP ERROR 500</p>
  
  <pre><code>Problem accessing /solr/. Reason:
  
      {msg=SolrCore 'collection1' is not available due to init failure: Unknown fieldType 'text' specified on field firstname,trace=org.apache.solr.common.SolrException: SolrCore 'collection1' is not available due to init failure: Unknown fieldType 'text' specified on field firstname
      at org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:860)
      at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:251)
      at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:158)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
      at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
      at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
      at org.eclipse.jetty.server.Server.handle(Server.java:368)
      at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
      at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
      at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942)
      at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004)
      at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)
      at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
      at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
      at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
      at java.lang.Thread.run(Unknown Source)
  Caused by: org.apache.solr.common.SolrException: Unknown fieldType 'text' specified on field firstname
      at org.apache.solr.schema.IndexSchema.loadFields(IndexSchema.java:644)
      at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:470)
      at org.apache.solr.schema.IndexSchema.&lt;init&gt;(IndexSchema.java:164)
      at org.apache.solr.schema.IndexSchemaFactory.create(IndexSchemaFactory.java:55)
      at org.apache.solr.schema.IndexSchemaFactory.buildIndexSchema(IndexSchemaFactory.java:69)
      at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:619)
      at org.apache.solr.core.CoreContainer.create(CoreContainer.java:657)
      at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:364)
      at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:356)
      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      ... 1 more
  ,code=500}
  </code></pre>