Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-3853

PMH Responder returns 500 Internal Error if item is in no Community or no Collection

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.6
    • Fix Version/s: 5.9
    • Component/s: OAI-PMH
    • Labels:
      None
    • Attachments:
      0
    • Comments:
      1
    • Documentation Status:
      Not Required

      Description

      If an Item in the OAI index has no communities or no collections recorded, the PMH responder throws a Null Pointer Exception and winds up returning status 500 to the client.  The code should be more graceful in such situations.

      The underlying problem is that SolrJ is returning an undocumented null rather than an empty Java Collection in this case, and our code doesn't check for null.  I suggest that we do that check, log a warning if found, and continue.  The resulting response may be absurd, but at least both ends of the transaction will be able to see what actually happened rather than a noncommittal "oops" and an ugly stack trace.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mwood Mark H. Wood
              Reporter:
              mwood Mark H. Wood
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: