java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 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)
    via by Jozsef Marton,
  • 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)
    via by Jozsef Marton,
    • 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)
    No Bugmate found.