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

SolrCLI can swallow all information about an exception from a request to Solr

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 7.3
    • None
    • scripts and tools
    • None

    Description

      User got an NPE when trying to create a core, no useful information:

      $ /usr/local/solr/bin/solr create -V -c new_core
      
      WARNING: Using _default configset with data driven schema functionality.
      NOT RECOMMENDED for production use.
               To turn off: bin/solr config -c new_core -p 8983 -property
      update.autoCreateFields -value false
      Exception in thread "main" java.lang.NullPointerException
      	at org.apache.solr.util.SolrCLI.getJson(SolrCLI.java:731)
      	at org.apache.solr.util.SolrCLI.getJson(SolrCLI.java:642)
      	at org.apache.solr.util.SolrCLI$CreateTool.runImpl(SolrCLI.java:1773)
      	at org.apache.solr.util.SolrCLI$ToolBase.runTool(SolrCLI.java:176)
      	at org.apache.solr.util.SolrCLI.main(SolrCLI.java:282)
      

      Looking at the code, this happened because SolrCLI got a ClientProtocolException in its call to HttpClient, but that exception did NOT have a message string attached, so when the code in the catch block tried to look at the message, it threw NPE.

      Attachments

        Activity

          People

            elyograg Shawn Heisey
            elyograg Shawn Heisey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: