-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[BUG][kotlin-spring] NoSuchMethodError 'void com.fasterxml.jackson.core.base.GeneratorBase.<init>(int, com.fasterxml.jackson.core.ObjectCodec, com.fasterxml.jackson.core.io.IOContext)' #18753
[BUG][kotlin-spring] NoSuchMethodError 'void com.fasterxml.jackson.core.base.GeneratorBase.<init>(int, com.fasterxml.jackson.core.ObjectCodec, com.fasterxml.jackson.core.io.IOContext)' #18753
Comments
Somehow there is a dependency clash of some jackson libs with versions 2.17.x vs. 2.14.2. buildscript {
dependencies {
classpath("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml") {
version { strictly("2.14.2") }
}
}
} |
I was hoping this would be fixed in the latest release (by #18799), but it unfortunately has not. Any idea when the this will be fixed? Adding the workaround everywhere is becoming quite annoying |
I tried to figure out where the issue actually occurs. I found that swagger-parser defines the 2.16.2 version, which is older. But the error occurs for any version above 2.15.2. The workaround above needs 2.15.2. 2.16 does not work anymore. My suspicion is that the cause is jackson-datatype-threetenbp, which uses jackson-databind:2.15.2. Another workaround would be to exclude jackson-databind from that dependancy. Edit: A workaround for when you use gradle in a multi-module build. |
…sitory The versions that are coming from the jackson-datatype-threetenbp are outdated and cause an issue when generating. There are interopability issues between jackson 2.15.2 and 2.16.0 and above. The dependency on jackson-threetenbp is causing jacskon 2.15.2 to be needed when generating code. This dependency has not been updated in over a year. Untill it does, it should be excluded from delivering its outdated versions to the classpath. Fixes OpenAPITools#18753
Maybe the maintainers could consider dropping support for jackson-threeten? Java 8 has been release over ten years ago, so this module should not be necessary anymore. According to https://newrelic.com/resources/report/2024-state-of-the-java-ecosystem the adoption of Java 7 is neglectable. There is also no free support for Java 6 and 7, except payed support by Azul, see https://www.azul.com/support-for-java-7-and-java-6/. So this should be a very, very small minority |
Bug Report Checklist
Description
My project is working with OpenAPI Generator up to 7.5.0 fine.
Since 7.6.0 i get this build error:
openapi-generator version
7.6.0
Related issues/PRs
PullRequest with error can be found here: RailwayStations/RSAPI#603
The text was updated successfully, but these errors were encountered: