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

NPE when indexing harvested items for OAI

    XMLWordPrintable

    Details

    • Attachments:
      0
    • Comments:
      2
    • Documentation Status:
      Not Required

      Description

      Reported on Stack Overflow: http://stackoverflow.com/questions/26300190/oai-import-dspace

      Items harvested into DSpace via OAI apparently don't have a submitter set. This causes a null pointer exception when adding the item to the Solr-based OAI core. From SO:

      Looking at line 275 here: https://github.com/DSpace/DSpace/blob/c5e3b7150a24c669172492ab3dc276111328a865/dspace-oai/src/main/java/org/dspace/xoai/app/XOAI.java

      This error seems to be caused by:

      doc.addField("item.submitter", item.getSubmitter().getEmail());

      So either you have an item who doesn't have a submitter, meaning that getSubmitter causes the NPE, or that there is a submitter, but that it doesn't have an email, meaning that getEmail will trigger the NPE.

        Attachments

          Activity

            People

            Assignee:
            tdonohue Tim Donohue
            Reporter:
            schweer Andrea Schweer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: