Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenAIRE import from external source doesn't work #9501

Closed
tdonohue opened this issue Apr 24, 2024 · 3 comments · Fixed by #9631
Closed

OpenAIRE import from external source doesn't work #9501

tdonohue opened this issue Apr 24, 2024 · 3 comments · Fixed by #9631
Assignees
Labels
bug high priority integration: OpenAIRE Related to integration with OpenAIRE testathon Reported by a tester during Community Testathon
Milestone

Comments

@tdonohue
Copy link
Member

Describe the bug
It is not possible to import content from OpenAIRE using the "Import from external sources" options on the MyDSpace page. Additionally, the descriptions are missing for these import sources (see screenshot):

openaire-broken

To Reproduce
Steps to reproduce the behavior:

  1. Go to MyDSpace
  2. Click the import button & select "Publication"
  3. Select one of the two (unlabeled) OpenAIRE sources. Attempt to run any search. All searches will error out. Behind the scenes in the DSpace log, this error occurs:
2024-04-24 21:31:01,268 ERROR ec49885b-3617-4441-a022-20dcf8505f51 29158a6e-5111-4a00-ae35-2cded0051dfc org.dspace.app.rest.exception.DSpaceApiExceptionControllerAdvice @ An exception has occurred (status:500)
 java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "org.dspace.importer.external.openaire.service.OpenAireImportMetadataSourceServiceImpl.retry(java.util.concurrent.Callable)" is null
   at org.dspace.importer.external.openaire.service.OpenAireImportMetadataSourceServiceImpl.getRecordsCount(OpenAireImportMetadataSourceServiceImpl.java:94) ~[dspace-api-8.0-SNAPSHOT.jar:8.0-SNAPSHOT]
   at org.dspace.external.provider.impl.LiveImportDataProvider.getNumberOfResults(LiveImportDataProvider.java:113) ~[dspace-api-8.0-SNAPSHOT.jar:8.0-SNAPSHOT]
   at org.dspace.external.service.impl.ExternalDataServiceImpl.getNumberOfResults(ExternalDataServiceImpl.java:92) ~[dspace-api-8.0-SNAPSHOT.jar:8.0-SNAPSHOT]
   at org.dspace.app.rest.repository.ExternalSourceRestRepository.getExternalSourceEntries(ExternalSourceRestRepository.java:78) ~[dspace-server-webapp-8.0-SNAPSHOT.jar:8.0-SNAPSHOT]

Expected behavior
Obviously, these searches should not throw errors. Additionally, we need to add translation keys for these two OpenAIRE sources to the en.json5 file in dspace-angular. They likely should say something like this:

"submission.import-external.source.openaire": "OpenAIRE Search by Author",

"submission.import-external.source.openaireTitle": "OpenAIRE Search by Title",

Related work
Unclear where this error began.

@tdonohue tdonohue added bug high priority help wanted Needs a volunteer to claim to move forward testathon Reported by a tester during Community Testathon integration: OpenAIRE Related to integration with OpenAIRE labels Apr 24, 2024
@tdonohue tdonohue added this to the 8.0 milestone Apr 24, 2024
@tdonohue
Copy link
Member Author

tdonohue commented Apr 24, 2024

Created a small PR to fix the missing i18n keys issue: DSpace/dspace-angular#2979 (Briefly mentioned about as a side note)

This PR however needs a volunteer to investigate why these imports are no longer working

@tdonohue
Copy link
Member Author

@abollini : Just a reminder that this ticket is also assigned to 4Science. If possible, it'd be good to see a PR in the next week as we are hoping to get this into 8.0.

@tdonohue
Copy link
Member Author

tdonohue commented Jun 4, 2024

@abollini : I've figured out how to solve this and created a PR in #9631 . This small PR fixes the bug and includes some minor code cleanup (of issues found during debugging).

Therefore, I'll claim this ticket from you & assign you as the PR reviewer for #9631. However, feel free to delegate as needed.

@tdonohue tdonohue assigned tdonohue and unassigned abollini Jun 4, 2024
@tdonohue tdonohue removed the help wanted Needs a volunteer to claim to move forward label Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug high priority integration: OpenAIRE Related to integration with OpenAIRE testathon Reported by a tester during Community Testathon
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants