-
Notifications
You must be signed in to change notification settings - Fork 38.3k
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
TypeNotPresentException: org/springframework/cglib/proxy/NoOp not present on Java 17 #30115
Comments
Please double-check your classpath / build configuration. I have verified that Also in the future please make an effort to include at least a few words for context and more details in your issues, and avoid screenshots. |
There is no such problem on JDK8, only when running on JDK17 |
@a364176773, can you please provide a sample application that reproduces the problem? |
Under spring-data-jpa using Sort for sorting, and the column type used is Timestamp, the following code can trigger the problem @sbrannen
entity
|
Because the problem is likely to be about dependency management, code snippets won't help here unfortunately. Could you provide a minimal sample application as requested (ideally generated from https://start.spring.io)? You can share it as a git repository or attach as zip file to this issue. |
I will take the time to finish this example, please wait |
demo.zip |
Thanks for the reproducer @a364176773. As it is itt does need a MySql database to start the application, but I was able to switch to H2 in memory database instead to at least make it start and reproduce the issue. From what I can see, this has something to do with the I generated some logs using the debugger in IDEA. When calling the controller running with Java 17 I get:
Same call to the controller under Java 8:
This needs further investigation on our part but is most probably a bug. |
Additional context: this seems to stem from the fact that Spring-Data-Commons uses the method's return type to chose and pass a In the OP's case, the return type is |
spring-projects/spring-boot#34742 |
The 347424 issue also exists only in jdk17, and I had great difficulty reproducing it. I only found one similar issue, also in webflux, where the classloader in the thread was inexplicably replaced with an AppClassLoader |
Maybe a similar approach as to #30210 could work here too? |
This fix included in 7e905e3 does not help at all. Change the version of spring-boot from 2.7.9 to 2.7.18 (spring-aop in version 5.3.31 - that one contains the fix) in delivered demo.zip example and you've got the same error. Please re-open this issue. It is related to CGLib Proxies not JdkDynamicAopProxy ones. Attached demo with h2 in-mem db and upgraded spring-boot version to 2.7.18 |
@krysz-clgx OSS support for Spring Framework has ended: https://spring.io/projects/spring-framework#support If you manage to reproduce the problem with a supported version, please create a new issue. |
Affects: Spring Framework 5.3.25 on Java 17
Stack Trace
The text was updated successfully, but these errors were encountered: