Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-4502

ShardHandlerFactory not initialized in CoreContainer when creating a Core manually.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 4.1
    • Fix Version/s: 4.9, 6.0
    • Component/s: None
    • Labels:

      Description

      We are using an embedded solr server for our unit testing purposes. In our scenario, we create a CoreContainer using only the solr-home path, and then create the cores manually using a CoreDescriptor.

      While the creation appears to work fine, it hits an NPE when it handles the search:

      Caused by: java.lang.NullPointerException
      at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:181)
      at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
      at org.apache.solr.core.SolrCore.execute(SolrCore.java:1816)
      at org.apache.solr.client.solrj.embedded.EmbeddedSolrServer.request(EmbeddedSolrServer.java:150)

      According to http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201301.mbox/%3CE8A9BF60-5577-45F9-8BEA-B85616C6539D%40gmail.com%3E , this is due to a missing CoreContainer#load.

        Attachments

          Activity

            People

            • Assignee:
              markrmiller@gmail.com Mark Miller
              Reporter:
              michael.aspetsberger Michael Aspetsberger
            • Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated: