Skip to content

OAI Harvester does not function when using Demo/Sandbox as content source #5478

Description

@tdonohue

Describe the bug

Discovered via Testathon, but I've reproduced it locally as well.

When using the OAI Harvester feature as any user, the feature always returns an error response. The backend error is always

2026-04-14 17:12:15,526 INFO  28a920d5-0cf4-4dd0-b17b-aab07d347ede e8d10cad-9564-4727-8494-5e644a7aeef8 org.dspace.app.rest.utils.DSpaceAPIRequestLoggingFilter @ Before request [PUT /server/api/core/collections/5c91d3a5-00ed-462f-b88f-78e45b5ffa6e/harvester] originated from /collections/5c91d3a5-00ed-462f-b88f-78e45b5ffa6e/edit/source
 [Fatal Error] :-1:-1: Premature end of file.
 2026-04-14 17:12:15,786 ERROR 28a920d5-0cf4-4dd0-b17b-aab07d347ede e8d10cad-9564-4727-8494-5e644a7aeef8 org.dspace.app.rest.exception.DSpaceApiExceptionControllerAdvice @ Unprocessable or invalid entity (status:422)
 org.dspace.app.rest.exception.UnprocessableEntityException: Incorrect harvest settings in request. The following errors were found: [invalidAddress: OAI server could not be reached.]
   at org.dspace.app.rest.repository.HarvestedCollectionRestRepository.update(HarvestedCollectionRestRepository.java:99)
   at org.dspace.app.rest.CollectionHarvestSettingsController.updateHarvestSettingsEndpoint(CollectionHarvestSettingsController.java:115)

(Be sure to notice the odd "Premature end of file error" that's buried in between the initial PUT request and the ERROR stacktrace)

To Reproduce

Steps to reproduce the behavior:

  1. Login as an Admin
  2. Create a new Collection for harvesting
  3. Edit Collection and go to the "Content Source" tab.
  4. Check the checkbox which says "This collection harvests its content from an external source"
  5. Now, fill out the required information. For example, I used this simple setup:
    • OAI Provider: https://demo.dspace.org/server/oai/request
    • OAI specific set id: col_123456789_1131 (NOTE: This is the Collection called "DCAT Test Papers")
    • Metadata Format: Simple Dublin Core
  6. Click "Save"
  7. You'll see an error appear in the UI saying the "provided settings were tested and did not work". The error in the backend logs will be the one I've shared above.

NOTE: This also appears to be reproducible on https://demo.dspace.org. So, I believe it also impacts 9.x

Expected behavior

Harvesting should obviously work again.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

affects: 9.xIssue impacts 9.x releasesaffects: mainIssue impacts "main" (latest release).bugintegration: OAI HarvesterRelated to pulling in external content via OAI harvestertestathonReported by a tester during Community Testathon

Type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions