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

Spring Data JPA extension - java.lang.ClassNotFoundException: org.springframework.data.domain.Unpaged #8571

Closed
laemm-line opened this issue Apr 14, 2020 · 6 comments · Fixed by #8620
Labels
area/spring Issues relating to the Spring integration kind/bug Something isn't working
Milestone

Comments

@laemm-line
Copy link

Describe the bug
I'm getting a ClassNotFoundException in Quarkus 1.3.2.Final with the Spring Data JPA extension when I call org.springframework.data.domain.Pageable#unpaged.

Expected behavior
Should not throw Exceptions.

Actual behavior
Getting the following Exception at runtime:

...
Caused by: java.lang.ClassNotFoundException: org.springframework.data.domain.Unpaged
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	... 66 more

To Reproduce
Steps to reproduce the behavior:
Create a Quarkus project with "io.quarkus:quarkus-spring-data-jpa" extension and call org.springframework.data.domain.Pageable#unpaged.

@laemm-line laemm-line added the kind/bug Something isn't working label Apr 14, 2020
@quarkusbot
Copy link

/cc @geoand

@quarkusbot quarkusbot added the area/spring Issues relating to the Spring integration label Apr 14, 2020
@geoand
Copy link
Contributor

geoand commented Apr 14, 2020

@aureamunoz seems like we need to add that class (and whatever else might be brought transitively) to the api jar.
We'll also need a test in Quarkus.

@aureamunoz
Copy link
Member

Ok, I'll do it

@aureamunoz
Copy link
Member

aureamunoz commented Apr 15, 2020

Hi @pucojazu,
I was not able to reproduce the issue. In fact the class in question is correctly included in the quarkus-spring-data-api 2.1.Final, see https://github.com/quarkusio/quarkus-spring-data-api/blob/9b10af0e454fd9627f345651dd25933af9888937/quarkus-spring-data-commons-api/pom.xml#L51 and Quarkus 1.3.2.Final is pulling this one.
In your error trace is the class org.springframework.data.domain.Unpaged that is not found but this one is not a class but a method in the Pageable class wich is correctly included.
Let me know if you need something else. Thanks

@laemm-line
Copy link
Author

Hello @aureamunoz,
thanks for your quick response!
You're right that org.springframework.data.domain.Pageable#unpaged is a method. But this method returns an instance of the class org.springframework.data.domain.Unpaged which seems to be missing in quarkus-spring-data-commons-api-2.1.Final.jar
I can see the class in the original spring-data-commons: https://github.com/spring-projects/spring-data-commons/blob/master/src/main/java/org/springframework/data/domain/Unpaged.java
Could you include it in the Quarkus version, too?

@aureamunoz
Copy link
Member

oh, yes, ok. For some reason I didn't find either the Upaged class and thought that it was only a method. I'll add it.

aureamunoz added a commit to aureamunoz/quarkus that referenced this issue Apr 16, 2020
aureamunoz added a commit to aureamunoz/quarkus that referenced this issue Apr 16, 2020
…ng data api. fix quarkusio#8571

chore: update spring-data-api version
@gsmet gsmet added this to the 1.4.0.Final milestone Apr 20, 2020
gsmet pushed a commit to gsmet/quarkus that referenced this issue Apr 20, 2020
…ng data api. fix quarkusio#8571

chore: update spring-data-api version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/spring Issues relating to the Spring integration kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants