Problem with AIP while running the flag '-o skipIfParentMissing=true'

153 views
Skip to first unread message

Thiago Moreira

unread,
Mar 24, 2022, 3:49:35 PM3/24/22
to DSpace Technical Support
Hello everyone,

I'm currently trying to migrate some data using AIP.

Backstory is we had an old Dspace version (5.5) and now we are switching to a new one, version 7+

While trying to restore using AIP at the new machine:

dspace packager -r -k -a -t AIP -e em...@email.com /path/AIP.zip

I get the Ingest Error: "Could not find a parent DSpaceObject referenced as 'xxx/xxx'"

When I set the flag as recommended '-o skipIfParentMissing=true' and run the same command, I get the following message:

"CREATED a total of 1 DSpace Objects." -> and it does not import.

I also tried to import a single community but I got the same error.

while running the first command (dspace packager -r -k -a) the users were normally imported. Running using the flag -r -f also did not work.

Any ideas of what I am doing wrong?

euler

unread,
Mar 24, 2022, 10:44:11 PM3/24/22
to DSpace Technical Support
Hi,

Have you tried:
dspace packager -r -a -f -t AIP -o createMetadataFields=true -o skipIfParentMissing=true -e [email] -i [handle]/0 [path]/sitewide-aip.zip

The command above assumed that you have exported the entire site using the below command:
dspace packager -d -a -t AIP -e [email] -i [handle]/0 /path/sitewide-aip.zip

Hope this helps,
euler

Michael Plate

unread,
Mar 25, 2022, 5:07:16 AM3/25/22
to dspac...@googlegroups.com
Hi,

Am 25.03.22 um 03:44 schrieb euler:
> Hi,
>
> Have you tried:
> dspace packager -r -a -f -t AIP -o createMetadataFields=true
[…]

AFAIK createMetadataFields does not work after DSpace 5.x .

Michael

Thiago Moreira

unread,
Mar 25, 2022, 9:00:52 AM3/25/22
to DSpace Technical Support
Sorry I answered euler in private, i'm new to Google Groups.

I ran what he suggested earlier and got the same result.
Also I believe the problem is with the creation of the new handle/0, perhaps something with the mets.xml file?

The children can't find their parents and cant recreate after because none was imported.

It's just an idea. Btw, do you think I should also ask for help in Github or just here is fine?

Thank you,
Thiago Moreira

Rupinder Singh

unread,
Dec 28, 2022, 7:20:13 AM12/28/22
to DSpace Technical Support
HI, 
Did anyone get a clue of what the problem is? is there any bug in Dspace 7.X?
Im also trying to migrate from Dspace 6.2 to Dspace 7.4. the packager command is returning the following errors. (with and without the skip parent option)

jesse@library:/dspace/bin$ sudo ./dspace packager -r -a -f -t AIP -e dsp...@cup.edu.in -i 32116/1 -o createMetadataFields=true /dspace/AIP/administration/administration.zip


WARNING -- You are running the packager in REPLACE mode.

REPLACE mode may be potentially dangerous as it will automatically remove and replace contents within DSpace.
We highly recommend backing up all your DSpace contents (files & database) before continuing.

Would you like to continue? [y/n]: y
Beginning replacement process...

Replacing DSpace object(s) with package located at /dspace/AIP/administration/administration.zip
Will replace existing DSpace COMMUNITY [ hdl=32116/1 ]
java.lang.UnsupportedOperationException: Could not find a parent DSpaceObject referenced as '32116/180' in the METS Manifest for object hdl:32116/181. A parent DSpaceObject must be specified from either the 'packager' command or noted in the METS Manifest itself.
    at org.dspace.content.packager.AbstractMETSIngester.getParentObject(AbstractMETSIngester.java:1240)
    at org.dspace.content.packager.AbstractMETSIngester.ingestObject(AbstractMETSIngester.java:386)
    at org.dspace.content.packager.AbstractMETSIngester.replace(AbstractMETSIngester.java:1075)
    at org.dspace.content.packager.AbstractPackageIngester.replaceAll(AbstractPackageIngester.java:275)
    at org.dspace.content.packager.AbstractPackageIngester.replaceAll(AbstractPackageIngester.java:303)
    at org.dspace.app.packager.Packager.replace(Packager.java:684)
    at org.dspace.app.packager.Packager.main(Packager.java:361)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:277)
    at org.dspace.app.launcher.ScriptLauncher.handleScript(ScriptLauncher.java:133)
    at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:98)
java.lang.UnsupportedOperationException: Could not find a parent DSpaceObject referenced as '32116/180' in the METS Manifest for object hdl:32116/181. A parent DSpaceObject must be specified from either the 'packager' command or noted in the METS Manifest itself.


jesse@library:/dspace/bin$ sudo ./dspace packager -r -a -f -t AIP -e dsp...@cup.edu.in -i 32116/1 -o createMetadataFields=true -o skipIfParentMissing=true -o ignoreHandle=true /dspace/AIP/administration/administration.zip


WARNING -- You are running the packager in REPLACE mode.

REPLACE mode may be potentially dangerous as it will automatically remove and replace contents within DSpace.
We highly recommend backing up all your DSpace contents (files & database) before continuing.

Would you like to continue? [y/n]: y
Beginning replacement process...

Replacing DSpace object(s) with package located at /dspace/AIP/administration/administration.zip
Will replace existing DSpace COMMUNITY [ hdl=32116/1 ]

REPLACED a total of 1 DSpace Objects.

Would you like to view a list of all objects that were replaced? [y/n]: y



REPLACED DSpace COMMUNITY [ hdl=32116/1 ]

I'm also attaching the Dspace Log files for more details. 

Another thing i can do is to import individual collections using SAF from GUI, but that has a different problem, It won't let me upload a collection, which has any duplicate items. (I have some items which are part of multiple collections, so the system lets the first import go through, but gives a duplicate handle error upon importing another collection SAF which has an already imported item.)

The main motive is to migrate my repository by any means possible. please help.
 
Thanks in advance, 
Rupinder Singh 
Assistant Librarian 
Central University of Punjab | Bathinda

dspace AIP submit.log
dspace.log
dspace AIP restore .log

Abhishek

unread,
Jul 25, 2024, 8:51:41 AM7/25/24
to DSpace Technical Support
Hello Everyone, 
I'm also facing the same issue, while doing restoring the AIP file from one server to different server. 
Can anyone please help.
Reply all
Reply to author
Forward
0 new messages