Hi.
We're on DSpace 7.6.1 and I'm trying to batch import items from a directory 
into different collections via command line. My command is:

./bin/dspace import -a -e [username] -s [filepath]/ETD2024-import-test -m 
mapfile
I am not specifying the collection there, as each item has the collection 
specified with a collections file, like this:

ETD-import-test
     -folder1
           -collections
          -contents
          -filename1.pdf
          -dublin_core.xml
          -metadata_thesis.xml
     -folder1
           -collections
          -contents
          -filename2.pdf
          -dublin_core.xml
          -metadata_thesis.xml

The collections file in each folder contain the appropriate handle path.

When I run the command in test mode (-v), it seems to go through smoothly. 
When I remove the -v and try to import the items, I get this error:

"No collections given. Assuming 'collections' file inside item directory

The script has started

Processing collections file: collections

Loading dublin core from 
/Users/jlee44/Documents/ETD-imports/2024-09/ETD2024-import-test/etdadmin_upload_783260/dublin_core.xml

Schema: dc Element: contributor Qualifier: author Value: [Last name, First 
name]

Started: 1727711731383

Ended: 1727711732556

Elapsed time: 1 secs (1173 msecs)

java.lang.Exception: Error committing changes to database: Cannot invoke 
"org.dspace.content.Collection.getID()" because "collection" is null, 
aborting most recent changes"

Any ideas about why this is happening? I double-checked the collections 
files where the handle path is separated and they look fine.

Thanks!

Joanna

-- 
All messages to this mailing list should adhere to the Code of Conduct: 
https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
--- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-tech/c4fb8fd4-4978-4e01-a453-d1a2b58fc6b1n%40googlegroups.com.

Reply via email to