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

LukeRequestHandler/schema.jsp errors if schema has no uniqueKey field

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: 1.4
    • Component/s: Admin UI
    • Labels:
      None

      Description

      if a schema doesn't have a uniqueKey field specified, teh schema explorer won't work, and logs this exception...

      SEVERE: java.lang.NullPointerException
              at org.apache.solr.handler.admin.LukeRequestHandler.getSchemaInfo(LukeRequestHandler.java:373)
              at org.apache.solr.handler.admin.LukeRequestHandler.handleRequestBody(LukeRequestHandler.java:133)
              at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
              at org.apache.solr.core.SolrCore.execute(SolrCore.java:1299)
              at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338)
              at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241)
              at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
      

        Activity

        Hide
        hossman Hoss Man added a comment -

        the fix seems pretty trivial, but i'd like to have a nice robust testcase of a "minimal" schema that we can have to help prevent little glitches like this in the future

        Show
        hossman Hoss Man added a comment - the fix seems pretty trivial, but i'd like to have a nice robust testcase of a "minimal" schema that we can have to help prevent little glitches like this in the future
        Hide
        hossman Hoss Man added a comment -

        patch that fixes the LukeRequestHandler, and adds a new "MinimalSchemaTest" to serve as a place to more tests like this in the future.

        In an attempt to proactively spot problems like this, it uses the catchall solrconfig.xml that many other test use and does some introspection to try and hit any request handler it can find with trivial input to make sure it doesn't barf.

        to make this work, i changed QueryElevationComponentTest to use a new solrconfig.xml (and in the process discovered a bug in the test where it wasn't hitting hte request handler it thought it was)

        any objects

        Show
        hossman Hoss Man added a comment - patch that fixes the LukeRequestHandler, and adds a new "MinimalSchemaTest" to serve as a place to more tests like this in the future. In an attempt to proactively spot problems like this, it uses the catchall solrconfig.xml that many other test use and does some introspection to try and hit any request handler it can find with trivial input to make sure it doesn't barf. to make this work, i changed QueryElevationComponentTest to use a new solrconfig.xml (and in the process discovered a bug in the test where it wasn't hitting hte request handler it thought it was) any objects
        Hide
        hossman Hoss Man added a comment -

        any objections to me committing this before 1.4?

        (by this i mean the test changes, i can't imagine anyone would object to me fixing the bug in LukeRequestHandler)

        Show
        hossman Hoss Man added a comment - any objections to me committing this before 1.4? (by this i mean the test changes, i can't imagine anyone would object to me fixing the bug in LukeRequestHandler)
        Hide
        shalinmangar Shalin Shekhar Mangar added a comment -

        any objections to me committing this before 1.4?

        Nope, please go ahead.

        Show
        shalinmangar Shalin Shekhar Mangar added a comment - any objections to me committing this before 1.4? Nope, please go ahead.
        Hide
        hossman Hoss Man added a comment -

        Committed revision 806289.

        Show
        hossman Hoss Man added a comment - Committed revision 806289.
        Hide
        gsingers Grant Ingersoll added a comment -

        Bulk close for Solr 1.4

        Show
        gsingers Grant Ingersoll added a comment - Bulk close for Solr 1.4

          People

          • Assignee:
            hossman Hoss Man
            Reporter:
            hossman Hoss Man
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development