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

Core admin CREATE with missing solrconfig file in 4.5 gives unhelpful too-terse message compared to 4.4

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.5
    • Fix Version/s: None
    • Component/s: multicore
    • Labels:
      None

      Description

      In branch_4x, a core admin CREATE request with a missing solrconfig.xml file gives a too-short message that does not indicate what the real problem was. In 4.4, the message included the cause.

      The request:

        curl "http://localhost:8983/solr/admin/cores?action=CREATE&name=collection2&indent=true"
      

      The response using a recent nightly build of 4.5:

      <?xml version="1.0" encoding="UTF-8"?>
      <response>
      
      <lst name="responseHeader">
        <int name="status">400</int>
        <int name="QTime">35</int>
      </lst>
      <lst name="error">
        <str name="msg">Error CREATEing SolrCore 'collection2': Unable to create core: collection2</str>
        <int name="code">400</int>
      </lst>
      </response>
      

      But that doesn't indicate any reason for why the core could not be created.

      The response using 4.4:

      <?xml version="1.0" encoding="UTF-8"?>
      <response>
      
      <lst name="responseHeader">
        <int name="status">400</int>
        <int name="QTime">16</int>
      </lst>
      <lst name="error">
        <str name="msg">Error CREATEing SolrCore 'collection2': Unable to create core: collection2 Caused by: Can't find resource 'solrconfig.xml' in classpath or 'solr\collection2\conf/', cwd=C:\cygwin\home\projects\solr-4.4.0\solr-4.4.0\example-test</str>
        <int name="code">400</int>
      </lst>
      </response>
      

      That tells me exactly why.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jkrupan Jack Krupansky
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: