4Science / DSpace

This repository contains the 4Science optimized DSpace & DSpace-CRIS distribution.
https://wiki.lyrasis.org/display/DSPACECRIS/
BSD 3-Clause "New" or "Revised" License
44 stars 63 forks source link

metadata-import fails on person entities if CSV contains ROR-ID values #464

Open chgoe opened 4 months ago

chgoe commented 4 months ago

Describe the bug This error occurs on version 2023.02.03: the script metadata-import fails for person entities if a ROR-ID value is provided.

To Reproduce In our case this applies to the following attributes, that we set values for through the UI ("Edit all the details"):

Exporting such a person using metadata-export will result in a CSV that contains values structured like this: Chemnitz University of Technology::will be referenced::ROR-ID::https://ror.org/00a208s56::600

When importing this CSV file (e.g. one generated through metadata-export, without any manual modifications) using metadata-import, the script will fail with the following error:

2024-07-26 13:32:53.648 ERROR metadata-import - 54 @ java.lang.NumberFormatException: For input string: "ROR-ID"
    at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    at java.base/java.lang.Integer.parseInt(Integer.java:652)
    at java.base/java.lang.Integer.valueOf(Integer.java:983)
    at org.dspace.app.bulkedit.MetadataImport.compareAndUpdate(MetadataImport.java:743)
    at org.dspace.app.bulkedit.MetadataImport.runImport(MetadataImport.java:410)
    at org.dspace.app.bulkedit.MetadataImport.internalRun(MetadataImport.java:213)
    at org.dspace.scripts.DSpaceRunnable.run(DSpaceRunnable.java:154)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)