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

License Administration - issue with search #1165

Closed
kosarko opened this issue Jan 27, 2025 · 3 comments
Closed

License Administration - issue with search #1165

kosarko opened this issue Jan 27, 2025 · 3 comments
Assignees
Labels
first issue should be small enough for new dev to start with v7

Comments

@kosarko
Copy link
Member

kosarko commented Jan 27, 2025

This was originally #1055 (comment)

Still can reproduce, see the vid:
https://github.com/user-attachments/assets/847dbb38-bec4-40b0-a861-d78286971812

The most recent error in dspace.log seems to match the error in the comment above:

2025-01-27 14:17:14,875 ERROR 3c6f655c-77cc-4c92-8388-3e9f0d5c26e9 4d7221af-bd34-405a-a2d5-79c4f0690205 org.dspace.app.rest.exception.DSpaceApiExceptionControllerAdvice @ An exception has occurred (status:500)
org.dspace.app.rest.exception.PaginationException: null
        at org.dspace.app.rest.utils.Utils.getPageObjectList(Utils.java:188) ~[classes/:7.6.1]
        at org.dspace.app.rest.converter.ConverterService.toRestPage(ConverterService.java:208) ~[classes/:7.6.1]
        at org.dspace.app.rest.converter.ConverterService$$FastClassBySpringCGLIB$$41367eae.invoke(<generated>) ~[classes/:7.6.1]
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) ~[spring-core-5.3.27.jar:5.3.27]
@kosarko kosarko added the v7 label Jan 27, 2025
@kosarko kosarko mentioned this issue Jan 27, 2025
11 tasks
@kosarko kosarko added the first issue should be small enough for new dev to start with label Mar 25, 2025
@kuchtiak-ufal
Copy link

kuchtiak-ufal commented Mar 26, 2025

Couldn't get the PaginationException anymore, by playing with frontend.

However, the exception can be reproduced by passing the invalid request to clarinlicenses API, e.g.

GET /server/api/core/clarinlicenses/search/byNameLike?page=3&size=10&sort=,DESC&name=Universal

The exception is thrown, when the total size of the records is less than 30 (e.g. 25).

In this case, the offset is calculated as page * size, which is 30, and if the offset is bigger than the totalSize, the PaginationException is thrown, and the PaginationException results in 500 Error.

Clarin-DSpace should somehow catch this exception, and rather provide the empty response.

@kuchtiak-ufal
Copy link

Pull Request: #1184

@kosarko
Copy link
Member Author

kosarko commented Apr 7, 2025

fixed in #1184

@kosarko kosarko closed this as completed Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
first issue should be small enough for new dev to start with v7
Projects
None yet
Development

No branches or pull requests

2 participants