ItemExportCLIIT failing

66 views
Skip to first unread message

Anis

unread,
Oct 28, 2022, 2:28:36 AM10/28/22
to DSpace Technical Support
Hey, I'm running the latest code for DSpace 7 and getting the following error on the ItemExport CLI integration test (pasting the relevant parts):

[ERROR] importItemByZipSafWithRelationships(org.dspace.app.itemimport.ItemImportCLIIT)
Caused by: org.hibernate.exception.ConstraintViolationException: could not execute batch
Caused by: org.h2.jdbc.JdbcBatchUpdateException: Unique index or primary key violation: "PUBLIC.U_CONSTRAINT_INDEX_4 ON PUBLIC.RELATIONSHIP(LEFT_ID NULLS FIRST, TYPE_ID NULLS FIRST, RIGHT_ID NULLS FIRST) VALUES ( /* key:25 */ UUID '959d80aa-1c4f-41d8-a89e-33eedbf7da33', 59, UUID '367396af-6633-44f1-9776-abf85b63ad2a')"; SQL statement:
insert into PUBLIC.relationship (latest_version_status, left_id, left_place, leftward_value, type_id, right_id, right_place, rightward_value, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?) [23505-210]

any idea how to fix this?

DSpace Technical Support

unread,
Oct 30, 2022, 2:59:26 PM10/30/22
to DSpace Technical Support
Hi Anis, do you have any modified code or tests running? Or modified relationships config in core / test config?

I've run the import tests locally (scoping just to that class with it.test=.....) myself and got 17 / 17 successes.

It looks like a duplicate relationship occurring during import (note: this is actually an Import test, not Export). This is odd because at a glance, it doesn't look like any UUIDs are reused in the test class, and new items are imported from the basic test XML each time.
Perhaps a map file lingering around that is causing the UUID to be used as if it's a re-import / resumption? In the failsafe logs created by Maven, can you see any additional references to those UUIDs?

Cheers

Kim

Anis

unread,
Nov 1, 2022, 7:32:29 AM11/1/22
to DSpace Technical Support
Hello, thanks for the reply Kim!

I'm getting different IT failures after pulling from the DSpace repo and merging with my local one, that import one seems to go through fine now. After that I was getting errors related to AbstractLiveImportIntegrationTest:checkMetadataValue(), the assertion failed for some reason? Now I pulled the latest code again and the test fail at CanvasDimensionsIT:
java.lang.NullPointerException
    at org.dspace.iiif.canvasdimension.CanvasDimensionsIT.setup(CanvasDimensionsIT.java:68)

I'm not sure if my test command is the right one? I'm using the following

mvn --no-transfer-progress -V clean install -P-assembly -Pcoverage-report -DskipIntegrationTests=false -Denforcer.skip=true -Dcheckstyle.skip=true -Dlicense.skip=true -Dxml.skip=true

Unit tests go through fine.


- Anis

Anis

unread,
Nov 22, 2022, 4:58:12 AM11/22/22
to DSpace Technical Support
I did a clean clone of the DSpace backend, tried to run the integration tests and it still fails at the same line,
java.lang.NullPointerException
    at org.dspace.iiif.canvasdimension.CanvasDimensionsIT.setup(CanvasDimensionsIT.java:68)

Really stumped with this so maybe I'll skip ITs for now
Reply all
Reply to author
Forward
0 new messages