2

I'm attempting to migrate a full DSpace installation (4.x) to a new 6.1. I'm performing

[dspace]/bin/dspace packager -d -a -t AIP -e repo@institution.edu -i OURHANDLE/0 sitewide-aip.zip

to export the entire site, without any special issues. The output are many .zip files including the sitewide-aip.zip.

The problem is when trying to restore in the new DSpace installation. After performing

[dspace]/bin/dspace packager -r -a -f -t AIP -e repo@institution.edu -i OURHANDLE/0 -o skipIfParentMissing=true /path/to/sitewide-aip.zip

an exception is thrown

Exception: Bad identifier/handle -- Cannot resolve handle "OURHANDLE/0"
java.lang.IllegalArgumentException: Bad identifier/handle -- Cannot resolve handle "OURHANDLE/0"
at org.dspace.app.packager.Packager.main(Packager.java:342)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:229)
at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:81)

Can't figure out why this is happening, since HANDLE/0 is suppossed to refer to base handle of the whole installation according to what I've researched so far.

Jocho Delgado
  • 103
  • 1
  • 1
  • 8

2 Answers2

1

What is your handle prefix? It can be found in your dspace.cfg file.

https://github.com/DSpace/DSpace/blob/dspace-6_x/dspace/config/dspace.cfg#L249

You should use that value for the command.

You should also be able to find it in your database using the following query

 select * from handle where handle like '%/0';
terrywb
  • 3,740
  • 3
  • 25
  • 50
  • Query outputs nothing. But the table handle is not empty, it shows many handles in the style OURHANDLE/x but no OURHANDLE/0. The handle prefix is OURHANDLE in both installations. – Jocho Delgado Jul 26 '17 at 21:48
  • If that returns nothing, then look at the value in your dspace.cfg – terrywb Jul 26 '17 at 21:50
  • Checked again. In target installation it is 12345679/0 somehow, even though it was configured as OURHANDLE in dspace.cfg – Jocho Delgado Jul 26 '17 at 21:52
  • In the source installation it is configured as OURHANDLE in dspace.cfg and it is the same in the database. But there is no OURHANDLE/0, only OURHANDLE/1-7 (the existing communities and items) – Jocho Delgado Jul 26 '17 at 21:54
  • Until you have reserved a handle prefix, I recommend you use the value in your target installation. The system may expect that value to be numeric. – terrywb Jul 26 '17 at 21:56
0

The problem ended up being the handle value in target installation. After executing

dspace/bin/dspace update-handle-prefix 123456789 OURHANDLE

to target installation, restoration process could be completed flawlessly.

Thanks to everyone for your help.

Jocho Delgado
  • 103
  • 1
  • 1
  • 8