Re: [Dspace-tech] dspace import throws NullPointerException
Hi Layale, make sure you got the right structure for the import directory see https://wiki.duraspace.org/display/DSDOC5x/Importing+and+Exporting+Items+via+Simple+Archive+Format#ImportingandExportingItemsviaSimpleArchiveFormat-DSpaceSimpleArchiveFormat The command output indicates that there is no directory in: /backup/staging/1 I assume that your structure looks like /backup/staging/1/dublin_core.xml /backup/staging/1/foo.pdf ... then you got to use -s /backup/staging Hope this helps Claudia Am 03.08.2015 um 12:12 schrieb Layale Bassil: Hello Claudia, Thank you so much for your clear response. I have added the below settings to the dspace.cfg file because they were missing. However the import is no more giving an error but the imported items are not being shown. I am getting the below output when importing one item using the below command: [root@Lclone ~]# /data/bin/dspace import -a -e dsp...@aub.edu.lb -c 10938/10266 -s /backup/staging/1 -m /backup/staging/mapfile Destination collections: Owning Collection: Faculty Publications Adding items from directory: /backup/staging/1 Generating mapfile: /backup/staging/mapfile Started: 1438596129729 Ended: 1438596130152 Elapsed time: 0 secs (423 msecs) But when I refresh the items in the collection no new items were added. Do you think it is a handle issue (maybe using an already used handle)? Or do I need to re-index? The mapfile is empty which means no import is occurring. What should I do? Thanks! Regards. -Original Message- From: Claudia Jürgen [mailto:claudia.juer...@ub.tu-dortmund.de] Sent: Friday, July 31, 2015 2:12 PM To: dspace-tech@lists.sourceforge.net Subject: Re: [Dspace-tech] dspace import throws NullPointerException Hello Layale, the import directory is configured in [dspace]/config/dspace.cfg ### Batch Item import settings ### # The directory where the results of imports will be placed (mapfile, upload file) org.dspace.app.batchitemimport.work.dir = ${dspace.dir}/imports The dspace.dir ist configured in dspace.cfg too # DSpace installation directory dspace.dir = ${dspace.install.dir} which uses the dspace.install.dir from [dspace-source]/dspace/build.properties There might be other issues like permissions. Hope this helps Claudia Am 31.07.2015 um 12:31 schrieb Layale Bassil: Hello Stefan, I am also facing exception when I try to import. I am using the same import command as the one you used, and I am getting the following exception at Line 108 which is (File tempWorkDirFile = new File(tempWorkDir); Exception in thread main java.lang.ExceptionInInitializerError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:274) at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.ja va:141) at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:78) Caused by: java.lang.NullPointerException at java.io.File.init(File.java:277) at org.dspace.app.itemimport.ItemImport.clinit(ItemImport.java:108) ... 4 more The error is not telling me anything, but it might be related to creating the temp working directory. Where can I find the value of this property: ConfigurationManager.getProperty(org.dspace.app.batchitemimport.work.dir); ? Your help is very much appreciated to know how to solve this issue. Thanks. -Original Message- From: Stefan Fritzsche [mailto:stefan.fritzs...@tu-dresden.de] Sent: Thursday, July 30, 2015 1:50 PM To: dspace-tech@lists.sourceforge.net Subject: [Dspace-tech] dspace import throws NullPointerException Dear Members, i try to ingest some content with the commandline tool dspace import. I want to ingest the content via the Simple Archive Format (https://wiki.duraspace.org/display/DSDOC5x/Importing+and+Exporting+Items+via+Simple+Archive+Format). The ingest is started with dspace@server dspace import -a -e f...@bar.demailto:f...@bar.de -s . -m mapfile. No collections given. Assuming 'collections' file inside item directory Adding items from directory: . Generating mapfile: mapfile Processing collections file: collections ... The content of the collection file is 123456789/9. When i start the ingest, the process throws a NullPointerException but if i use the -c option with the collection_id from the file it works. I use the debugger to find the cause of the exception. The method addItem(Context c, Collection[] mycollections, String path, String itemname, PrintWriter mapOut, boolean template) throws Exception) in the package org.dspace.app.itemimport throws the exception. I determine that the method addItem is called with the parameter mycollections = null but if i use the -c option the parameter holds the collection_id. I add at line 736 the statement mycollections = clist. After this change the process behave like -c
Re: [Dspace-tech] dspace import throws NullPointerException
Hello Claudia, Thank you so much for your clear response. I have added the below settings to the dspace.cfg file because they were missing. However the import is no more giving an error but the imported items are not being shown. I am getting the below output when importing one item using the below command: [root@Lclone ~]# /data/bin/dspace import -a -e dsp...@aub.edu.lb -c 10938/10266 -s /backup/staging/1 -m /backup/staging/mapfile Destination collections: Owning Collection: Faculty Publications Adding items from directory: /backup/staging/1 Generating mapfile: /backup/staging/mapfile Started: 1438596129729 Ended: 1438596130152 Elapsed time: 0 secs (423 msecs) But when I refresh the items in the collection no new items were added. Do you think it is a handle issue (maybe using an already used handle)? Or do I need to re-index? The mapfile is empty which means no import is occurring. What should I do? Thanks! Regards. -Original Message- From: Claudia Jürgen [mailto:claudia.juer...@ub.tu-dortmund.de] Sent: Friday, July 31, 2015 2:12 PM To: dspace-tech@lists.sourceforge.net Subject: Re: [Dspace-tech] dspace import throws NullPointerException Hello Layale, the import directory is configured in [dspace]/config/dspace.cfg ### Batch Item import settings ### # The directory where the results of imports will be placed (mapfile, upload file) org.dspace.app.batchitemimport.work.dir = ${dspace.dir}/imports The dspace.dir ist configured in dspace.cfg too # DSpace installation directory dspace.dir = ${dspace.install.dir} which uses the dspace.install.dir from [dspace-source]/dspace/build.properties There might be other issues like permissions. Hope this helps Claudia Am 31.07.2015 um 12:31 schrieb Layale Bassil: Hello Stefan, I am also facing exception when I try to import. I am using the same import command as the one you used, and I am getting the following exception at Line 108 which is (File tempWorkDirFile = new File(tempWorkDir); Exception in thread main java.lang.ExceptionInInitializerError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:274) at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.ja va:141) at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:78) Caused by: java.lang.NullPointerException at java.io.File.init(File.java:277) at org.dspace.app.itemimport.ItemImport.clinit(ItemImport.java:108) ... 4 more The error is not telling me anything, but it might be related to creating the temp working directory. Where can I find the value of this property: ConfigurationManager.getProperty(org.dspace.app.batchitemimport.work.dir); ? Your help is very much appreciated to know how to solve this issue. Thanks. -Original Message- From: Stefan Fritzsche [mailto:stefan.fritzs...@tu-dresden.de] Sent: Thursday, July 30, 2015 1:50 PM To: dspace-tech@lists.sourceforge.net Subject: [Dspace-tech] dspace import throws NullPointerException Dear Members, i try to ingest some content with the commandline tool dspace import. I want to ingest the content via the Simple Archive Format (https://wiki.duraspace.org/display/DSDOC5x/Importing+and+Exporting+Items+via+Simple+Archive+Format). The ingest is started with dspace@server dspace import -a -e f...@bar.demailto:f...@bar.de -s . -m mapfile. No collections given. Assuming 'collections' file inside item directory Adding items from directory: . Generating mapfile: mapfile Processing collections file: collections ... The content of the collection file is 123456789/9. When i start the ingest, the process throws a NullPointerException but if i use the -c option with the collection_id from the file it works. I use the debugger to find the cause of the exception. The method addItem(Context c, Collection[] mycollections, String path, String itemname, PrintWriter mapOut, boolean template) throws Exception) in the package org.dspace.app.itemimport throws the exception. I determine that the method addItem is called with the parameter mycollections = null but if i use the -c option the parameter holds the collection_id. I add at line 736 the statement mycollections = clist. After this change the process behave like -c option is set. My questions are: Is this a bug and should i report it? Has my fix some side effects? Thanks in advance, Stefan -- ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.netmailto:DSpace-tech@lists.sourceforge .net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Re: [Dspace-tech] dspace import throws NullPointerException
Hello, Thank you so much Kostas and Claudia! Well everything was correct except that I should use /backup/staging instead of /backup/staging/1. I thought using the full path will work by importing only the specified item. The items are now properly imported. Is it normal that I have to re-index for them to be searchable? Many thanks again for your continuous support. Regards. Layale. -Original Message- From: Claudia Jürgen [mailto:claudia.juer...@ub.tu-dortmund.de] Sent: Monday, August 03, 2015 1:28 PM To: dspace-tech@lists.sourceforge.net Subject: Re: [Dspace-tech] dspace import throws NullPointerException Hi Layale, make sure you got the right structure for the import directory see https://wiki.duraspace.org/display/DSDOC5x/Importing+and+Exporting+Items+via+Simple+Archive+Format#ImportingandExportingItemsviaSimpleArchiveFormat-DSpaceSimpleArchiveFormat The command output indicates that there is no directory in: /backup/staging/1 I assume that your structure looks like /backup/staging/1/dublin_core.xml /backup/staging/1/foo.pdf ... then you got to use -s /backup/staging Hope this helps Claudia Am 03.08.2015 um 12:12 schrieb Layale Bassil: Hello Claudia, Thank you so much for your clear response. I have added the below settings to the dspace.cfg file because they were missing. However the import is no more giving an error but the imported items are not being shown. I am getting the below output when importing one item using the below command: [root@Lclone ~]# /data/bin/dspace import -a -e dsp...@aub.edu.lb -c 10938/10266 -s /backup/staging/1 -m /backup/staging/mapfile Destination collections: Owning Collection: Faculty Publications Adding items from directory: /backup/staging/1 Generating mapfile: /backup/staging/mapfile Started: 1438596129729 Ended: 1438596130152 Elapsed time: 0 secs (423 msecs) But when I refresh the items in the collection no new items were added. Do you think it is a handle issue (maybe using an already used handle)? Or do I need to re-index? The mapfile is empty which means no import is occurring. What should I do? Thanks! Regards. -Original Message- From: Claudia Jürgen [mailto:claudia.juer...@ub.tu-dortmund.de] Sent: Friday, July 31, 2015 2:12 PM To: dspace-tech@lists.sourceforge.net Subject: Re: [Dspace-tech] dspace import throws NullPointerException Hello Layale, the import directory is configured in [dspace]/config/dspace.cfg ### Batch Item import settings ### # The directory where the results of imports will be placed (mapfile, upload file) org.dspace.app.batchitemimport.work.dir = ${dspace.dir}/imports The dspace.dir ist configured in dspace.cfg too # DSpace installation directory dspace.dir = ${dspace.install.dir} which uses the dspace.install.dir from [dspace-source]/dspace/build.properties There might be other issues like permissions. Hope this helps Claudia Am 31.07.2015 um 12:31 schrieb Layale Bassil: Hello Stefan, I am also facing exception when I try to import. I am using the same import command as the one you used, and I am getting the following exception at Line 108 which is (File tempWorkDirFile = new File(tempWorkDir); Exception in thread main java.lang.ExceptionInInitializerError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:274) at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.j a va:141) at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:78) Caused by: java.lang.NullPointerException at java.io.File.init(File.java:277) at org.dspace.app.itemimport.ItemImport.clinit(ItemImport.java:108) ... 4 more The error is not telling me anything, but it might be related to creating the temp working directory. Where can I find the value of this property: ConfigurationManager.getProperty(org.dspace.app.batchitemimport.work.dir); ? Your help is very much appreciated to know how to solve this issue. Thanks. -Original Message- From: Stefan Fritzsche [mailto:stefan.fritzs...@tu-dresden.de] Sent: Thursday, July 30, 2015 1:50 PM To: dspace-tech@lists.sourceforge.net Subject: [Dspace-tech] dspace import throws NullPointerException Dear Members, i try to ingest some content with the commandline tool dspace import. I want to ingest the content via the Simple Archive Format (https://wiki.duraspace.org/display/DSDOC5x/Importing+and+Exporting+Items+via+Simple+Archive+Format). The ingest is started with dspace@server dspace import -a -e f...@bar.demailto:f...@bar.de -s . -m mapfile. No collections given. Assuming 'collections' file inside item directory Adding items from directory: . Generating mapfile: mapfile Processing collections file: collections ... The content of the collection file is 123456789/9. When i start the ingest, the process
Re: [Dspace-tech] dspace import throws NullPointerException
Hi, I think the point is that the value is returning null - e.g. it is not set in your dspace.cfg - and so a null is passed into the new File(), and throwing a NullPointerException. Ugh. That code needs updating - the static initializer in ItemImport ought to have try {} catch around it, and there should be explicit handling of the configuration property not being present (null). G On 31 July 2015 at 11:31, Layale Bassil l...@aub.edu.lb wrote: Hello Stefan, I am also facing exception when I try to import. I am using the same import command as the one you used, and I am getting the following exception at Line 108 which is (File tempWorkDirFile = new File(tempWorkDir); Exception in thread main java.lang.ExceptionInInitializerError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:274) at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:141) at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:78) Caused by: java.lang.NullPointerException at java.io.File.init(File.java:277) at org.dspace.app.itemimport.ItemImport.clinit(ItemImport.java:108) ... 4 more The error is not telling me anything, but it might be related to creating the temp working directory. Where can I find the value of this property: ConfigurationManager.getProperty(org.dspace.app.batchitemimport.work.dir); ? Your help is very much appreciated to know how to solve this issue. Thanks. -Original Message- From: Stefan Fritzsche [mailto:stefan.fritzs...@tu-dresden.de] Sent: Thursday, July 30, 2015 1:50 PM To: dspace-tech@lists.sourceforge.net Subject: [Dspace-tech] dspace import throws NullPointerException Dear Members, i try to ingest some content with the commandline tool dspace import. I want to ingest the content via the Simple Archive Format ( https://wiki.duraspace.org/display/DSDOC5x/Importing+and+Exporting+Items+via+Simple+Archive+Format ). The ingest is started with dspace@server dspace import -a -e f...@bar.de -s . -m mapfile. No collections given. Assuming 'collections' file inside item directory Adding items from directory: . Generating mapfile: mapfile Processing collections file: collections ... The content of the collection file is 123456789/9. When i start the ingest, the process throws a NullPointerException but if i use the -c option with the collection_id from the file it works. I use the debugger to find the cause of the exception. The method addItem(Context c, Collection[] mycollections, String path, String itemname, PrintWriter mapOut, boolean template) throws Exception) in the package org.dspace.app.itemimport throws the exception. I determine that the method addItem is called with the parameter mycollections = null but if i use the -c option the parameter holds the collection_id. I add at line 736 the statement mycollections = clist. After this change the process behave like -c option is set. My questions are: Is this a bug and should i report it? Has my fix some side effects? Thanks in advance, Stefan -- ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette -- ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette -- ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Re: [Dspace-tech] dspace import throws NullPointerException
Hello Stefan, I am also facing exception when I try to import. I am using the same import command as the one you used, and I am getting the following exception at Line 108 which is (File tempWorkDirFile = new File(tempWorkDir); Exception in thread main java.lang.ExceptionInInitializerError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:274) at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:141) at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:78) Caused by: java.lang.NullPointerException at java.io.File.init(File.java:277) at org.dspace.app.itemimport.ItemImport.clinit(ItemImport.java:108) ... 4 more The error is not telling me anything, but it might be related to creating the temp working directory. Where can I find the value of this property: ConfigurationManager.getProperty(org.dspace.app.batchitemimport.work.dir); ? Your help is very much appreciated to know how to solve this issue. Thanks. -Original Message- From: Stefan Fritzsche [mailto:stefan.fritzs...@tu-dresden.de] Sent: Thursday, July 30, 2015 1:50 PM To: dspace-tech@lists.sourceforge.net Subject: [Dspace-tech] dspace import throws NullPointerException Dear Members, i try to ingest some content with the commandline tool dspace import. I want to ingest the content via the Simple Archive Format (https://wiki.duraspace.org/display/DSDOC5x/Importing+and+Exporting+Items+via+Simple+Archive+Format). The ingest is started with dspace@server dspace import -a -e f...@bar.demailto:f...@bar.de -s . -m mapfile. No collections given. Assuming 'collections' file inside item directory Adding items from directory: . Generating mapfile: mapfile Processing collections file: collections ... The content of the collection file is 123456789/9. When i start the ingest, the process throws a NullPointerException but if i use the -c option with the collection_id from the file it works. I use the debugger to find the cause of the exception. The method addItem(Context c, Collection[] mycollections, String path, String itemname, PrintWriter mapOut, boolean template) throws Exception) in the package org.dspace.app.itemimport throws the exception. I determine that the method addItem is called with the parameter mycollections = null but if i use the -c option the parameter holds the collection_id. I add at line 736 the statement mycollections = clist. After this change the process behave like -c option is set. My questions are: Is this a bug and should i report it? Has my fix some side effects? Thanks in advance, Stefan -- ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.netmailto:DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette -- ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Re: [Dspace-tech] dspace import throws NullPointerException
Hello Claudia, thanks for your reply. I got the same problem when i use the replace options instead the add. Should i report both as one issues or should be open a issue for each case? Kind regards, Stefan On 07/30/2015 01:44 PM, Claudia Jürgen wrote: Hello Stefan, you are right this looks (not tested it) like a bug in: https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/app/itemimport/ItemImport.java#L736 addItem(c, mycollections, sourceDir, dircontents[i], mapOut, template); should be addItem(c, clist, sourceDir, dircontents[i], mapOut, template); If you add the line you mentioned I add at line 736 the statement mycollections = clist. After this change the process behave like -c option is set. This will fail if using the importer with the -c option. You can file it in our issue Tracker: https://jira.duraspace.org/browse/DS/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel Hope this helps and Grüße aus dem Ruhrpott Claudia Am 30.07.2015 um 12:50 schrieb Stefan Fritzsche: Dear Members, i try to ingest some content with the commandline tool dspace import. I want to ingest the content via the Simple Archive Format (https://wiki.duraspace.org/display/DSDOC5x/Importing+and+Exporting+Items+via+Simple+Archive+Format). The ingest is started with dspace@server dspace import -a -e f...@bar.de -s . -m mapfile. No collections given. Assuming 'collections' file inside item directory Adding items from directory: . Generating mapfile: mapfile Processing collections file: collections ... The content of the collection file is 123456789/9. When i start the ingest, the process throws a NullPointerException but if i use the -c option with the collection_id from the file it works. I use the debugger to find the cause of the exception. The method addItem(Context c, Collection[] mycollections, String path, String itemname, PrintWriter mapOut, boolean template) throws Exception) in the package org.dspace.app.itemimport throws the exception. I determine that the method addItem is called with the parameter mycollections = null but if i use the -c option the parameter holds the collection_id. I add at line 736 the statement mycollections = clist. After this change the process behave like -c option is set. My questions are: Is this a bug and should i report it? Has my fix some side effects? Thanks in advance, Stefan -- ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette -- Stefan Fritzsche email: stefan.fritzs...@tu-dresden.de tel: (49) 351 463-33212 - Zellescher Weg 12 // Willersbau A 109 01069 Dresden -- ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Re: [Dspace-tech] dspace import throws NullPointerException
Hello Stefan, you are right this looks (not tested it) like a bug in: https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/app/itemimport/ItemImport.java#L736 addItem(c, mycollections, sourceDir, dircontents[i], mapOut, template); should be addItem(c, clist, sourceDir, dircontents[i], mapOut, template); If you add the line you mentioned I add at line 736 the statement mycollections = clist. After this change the process behave like -c option is set. This will fail if using the importer with the -c option. You can file it in our issue Tracker: https://jira.duraspace.org/browse/DS/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel Hope this helps and Grüße aus dem Ruhrpott Claudia Am 30.07.2015 um 12:50 schrieb Stefan Fritzsche: Dear Members, i try to ingest some content with the commandline tool dspace import. I want to ingest the content via the Simple Archive Format (https://wiki.duraspace.org/display/DSDOC5x/Importing+and+Exporting+Items+via+Simple+Archive+Format). The ingest is started with dspace@server dspace import -a -e f...@bar.de -s . -m mapfile. No collections given. Assuming 'collections' file inside item directory Adding items from directory: . Generating mapfile: mapfile Processing collections file: collections ... The content of the collection file is 123456789/9. When i start the ingest, the process throws a NullPointerException but if i use the -c option with the collection_id from the file it works. I use the debugger to find the cause of the exception. The method addItem(Context c, Collection[] mycollections, String path, String itemname, PrintWriter mapOut, boolean template) throws Exception) in the package org.dspace.app.itemimport throws the exception. I determine that the method addItem is called with the parameter mycollections = null but if i use the -c option the parameter holds the collection_id. I add at line 736 the statement mycollections = clist. After this change the process behave like -c option is set. My questions are: Is this a bug and should i report it? Has my fix some side effects? Thanks in advance, Stefan -- ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette -- Claudia Juergen Eldorado Technische Universität Dortmund Universitätsbibliothek Vogelpothsweg 76 44227 Dortmund Tel.: +49 231-755 40 43 Fax: +49 231-755 40 32 claudia.juer...@ub.tu-dortmund.de www.ub.tu-dortmund.de Wichtiger Hinweis: Die Information in dieser E-Mail ist vertraulich. Sie ist ausschließlich für den Adressaten bestimmt. Sollten Sie nicht der für diese E-Mail bestimmte Adressat sein, unterrichten Sie bitte den Absender und vernichten Sie diese Mail. Vielen Dank. Unbeschadet der Korrespondenz per E-Mail sind unsere Erklärungen ausschließlich final rechtsverbindlich, wenn sie in herkömmlicher Schriftform (mit eigenhändiger Unterschrift) oder durch Übermittlung eines solchen Schriftstücks per Telefax erfolgen. Important note: The information included in this e-mail is confidential. It is solely intended for the recipient. If you are not the intended recipient of this e-mail please contact the sender and delete this message. Thank you. Without prejudice of e-mail correspondence our statements are only legally binding when they are made in the conventional written form (with personal signature) or when such documents are sent by fax. -- ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Re: [Dspace-tech] dspace import throws NullPointerException
Hello Stefan, file one, they are most likely closely related. Sunny greetings Claudia Am 30.07.2015 um 14:02 schrieb Stefan Fritzsche: Hello Claudia, thanks for your reply. I got the same problem when i use the replace options instead the add. Should i report both as one issues or should be open a issue for each case? Kind regards, Stefan On 07/30/2015 01:44 PM, Claudia Jürgen wrote: Hello Stefan, you are right this looks (not tested it) like a bug in: https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/app/itemimport/ItemImport.java#L736 addItem(c, mycollections, sourceDir, dircontents[i], mapOut, template); should be addItem(c, clist, sourceDir, dircontents[i], mapOut, template); If you add the line you mentioned I add at line 736 the statement mycollections = clist. After this change the process behave like -c option is set. This will fail if using the importer with the -c option. You can file it in our issue Tracker: https://jira.duraspace.org/browse/DS/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel Hope this helps and Grüße aus dem Ruhrpott Claudia Am 30.07.2015 um 12:50 schrieb Stefan Fritzsche: Dear Members, i try to ingest some content with the commandline tool dspace import. I want to ingest the content via the Simple Archive Format (https://wiki.duraspace.org/display/DSDOC5x/Importing+and+Exporting+Items+via+Simple+Archive+Format). The ingest is started with dspace@server dspace import -a -e f...@bar.de -s . -m mapfile. No collections given. Assuming 'collections' file inside item directory Adding items from directory: . Generating mapfile: mapfile Processing collections file: collections ... The content of the collection file is 123456789/9. When i start the ingest, the process throws a NullPointerException but if i use the -c option with the collection_id from the file it works. I use the debugger to find the cause of the exception. The method addItem(Context c, Collection[] mycollections, String path, String itemname, PrintWriter mapOut, boolean template) throws Exception) in the package org.dspace.app.itemimport throws the exception. I determine that the method addItem is called with the parameter mycollections = null but if i use the -c option the parameter holds the collection_id. I add at line 736 the statement mycollections = clist. After this change the process behave like -c option is set. My questions are: Is this a bug and should i report it? Has my fix some side effects? Thanks in advance, Stefan -- ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette -- ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette