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

NPE during SAF format import (ItemImport) with collections files

    XMLWordPrintable

    Details

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

      Description

      In DSpace/DS-1933 (specify owning collection per-item in SAF import), it was proposed to allow using collections files in the batch import. It has been implemented and documented: https://wiki.duraspace.org/display/DSDOC5x/Importing+and+Exporting+Items+via+Simple+Archive+Format#ImportingandExportingItemsviaSimpleArchiveFormat-OtherOptions

      But the collections file it is not processed, as seen on the output given below. Patch is attached for version 5.1 (though Jira does not allow selecting version 5.1)

      dspace@machine:/tmp$ cat items/000578988/collections
      123456789/72
      dspace@devrepozitorium:/tmp$ /home/dspace/my-repository/bin/dspace import --add --eperson="admin@my-repository" --source=items -m mapfile.txt
      No collections given. Assuming 'collections' file inside item directory
      Adding items from directory: items
      Generating mapfile: mapfile.txt
      Processing collections file: collections
      Adding item from directory 000578988
      java.lang.NullPointerException
      at org.dspace.app.itemimport.ItemImport.addItem(ItemImport.java:865)
      at org.dspace.app.itemimport.ItemImport.addItems(ItemImport.java:736)
      at org.dspace.app.itemimport.ItemImport.main(ItemImport.java:498)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:225)
      at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:77)
      java.lang.NullPointerException
      Started: 1435493489038
      Ended: 1435493489519
      Elapsed time: 0 secs (481 msecs)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tdonohue Tim Donohue
              Reporter:
              jmarton Jozsef Marton
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: