Skip to content

JacksonFeature NoClassDefFoundError #1473

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
youming-lin opened this issue Jan 26, 2022 · 0 comments · Fixed by #1474
Closed

JacksonFeature NoClassDefFoundError #1473

youming-lin opened this issue Jan 26, 2022 · 0 comments · Fixed by #1474
Labels
bug Something isn't working

Comments

@youming-lin
Copy link

Describe the bug
I'm getting error running unit tests:

java.lang.NoClassDefFoundError: com.fasterxml.jackson.core.util.JacksonFeature
	at com.fasterxml.jackson.databind.ObjectMapper.<init>(ObjectMapper.java:673)
	at com.fasterxml.jackson.databind.ObjectMapper.<init>(ObjectMapper.java:576)
	at io.swagger.v3.core.util.ObjectMapperFactory.create(ObjectMapperFactory.java:79)
	at io.swagger.v3.core.util.ObjectMapperFactory.createJson(ObjectMapperFactory.java:65)
	at io.swagger.v3.core.util.Json.mapper(Json.java:13)
	at org.springdoc.ui.AbstractSwaggerIndexTransformer.<init>(AbstractSwaggerIndexTransformer.java:86)
	at org.springdoc.webmvc.ui.SwaggerIndexPageTransformer.<init>(SwaggerIndexPageTransformer.java:56)
<rest omitted>

I believe the issue is due to the jackson-core in webjars-locator-core is overriding its version for everything else:
Screen Shot 2022-01-26 at 11 17 32 AM

Per https://fasterxml.github.io/jackson-core/javadoc/2.12/com/fasterxml/jackson/core/util/JacksonFeature.html, JacksonFeature is added in 2.12.0, which is newer than the version in webjars-locator-core.

Fix is to update webjars-locator-core to 0.48.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants