Skip to content

NoClassDefFoundError when processing reflection hints for PageModule #3033

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

Closed
christophstrobl opened this issue Jan 24, 2024 · 0 comments
Closed
Assignees
Labels
theme: aot An issue related to Ahead-Of-Time processing type: regression A regression from a previous release

Comments

@christophstrobl
Copy link
Member

christophstrobl commented Jan 24, 2024

We need to guard the hint for Unpaged in WebRuntimeHints so it is only triggered if jackson is present.

Exception in thread "main" java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/module/SimpleModule
...
at org.springframework.data.web.aot.WebRuntimeHints.lambda$registerHints$0(WebRuntimeHints.java:36)	
	at org.springframework.aot.hint.ReflectionHints.registerType(ReflectionHints.java:88)	
	at org.springframework.data.web.aot.WebRuntimeHints.registerHints(WebRuntimeHints.java:35)	
	at org.springframework.context.aot.RuntimeHintsBeanFactoryInitializationAotProcessor$RuntimeHintsRegistrarContribution.lambda$applyTo$0(RuntimeHintsBeanFactoryInitializationAotProcessor.java:116)	
	at java.base/java.util.LinkedHashMap$LinkedValues.forEach(LinkedHashMap.java:647)
@christophstrobl christophstrobl added the theme: aot An issue related to Ahead-Of-Time processing label Jan 24, 2024
@christophstrobl christophstrobl self-assigned this Jan 24, 2024
@christophstrobl christophstrobl changed the title Guard AOT PageModule hint. NoClassDefFoundError when processing reflection hints for PageModule. Jan 24, 2024
@christophstrobl christophstrobl added type: bug A general bug type: regression A regression from a previous release and removed type: bug A general bug labels Jan 24, 2024
@mp911de mp911de linked a pull request Jan 24, 2024 that will close this issue
@mp911de mp911de changed the title NoClassDefFoundError when processing reflection hints for PageModule. NoClassDefFoundError when processing reflection hints for PageModule Jan 24, 2024
@mp911de mp911de added this to the 3.2.3 (2023.1.3) milestone Jan 24, 2024
mp911de pushed a commit that referenced this issue Jan 24, 2024
This commit makes sure to only register runtime hints for PageModule if Jackson is present.
Use newly introduced ClassPathExclusions instead of manually creating the ClassLoader.

Closes #3033
Original pull request: #3034
mp911de added a commit that referenced this issue Jan 24, 2024
Javadoc, static imports.

See #3033
Original pull request: #3034
mp911de added a commit that referenced this issue Jan 24, 2024
Javadoc, static imports.

See #3033
Original pull request: #3034
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme: aot An issue related to Ahead-Of-Time processing type: regression A regression from a previous release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants