Cheng Pan
06/11/2024, 1:09 PMChris
06/11/2024, 1:22 PMCheng Pan
06/11/2024, 1:26 PM./gradlew :iceberg-mr:dependencies | grep 'com.fasterxml.jackson' on the issue comment, I suppose the Jackson version should be consistentChris
06/11/2024, 1:28 PMChris
06/11/2024, 1:29 PMChris Lee
06/11/2024, 1:31 PMI donât think this is a simple âversion not matchâ issue.A common cause of
NoSuchFieldError is running with a different ABI (binary interface) than the code is compiled against, at runtime its unable to find ALLOW_LEADING_PLUS_SIGN_FOR_NUMBERS.
The error indicates thatâŠthatâs the likely cause. It would be helpful to run the test withisnât available in the Jackson version that is being used at runtime when the test is executed. I checked andALLOW_LEADING_PLUS_SIGN_FOR_NUMBERSwas introduced with Jackson 2.14, meaning that the test is using an earlier Jackson version.ALLOW_LEADING_PLUS_SIGN_FOR_NUMBERS
--scan and share that link.Cheng Pan
06/11/2024, 1:32 PMCheng Pan
06/11/2024, 1:32 PMChris
06/11/2024, 1:33 PMChris Lee
06/11/2024, 1:35 PMCheng Pan
06/11/2024, 1:36 PMCheng Pan
06/11/2024, 1:37 PMChris Lee
06/11/2024, 1:39 PMCheng Pan
06/11/2024, 1:42 PMChris Lee
06/11/2024, 1:43 PMjava {
consistentResolution {
useCompileClasspathVersions()
}
}
Yes, if using defaults the code in src/test uses the test* configurations - presumably your build script is adding dependencies to testImplementation etc.Cheng Pan
06/11/2024, 1:44 PMCheng Pan
06/11/2024, 1:45 PMCheng Pan
06/11/2024, 1:45 PM+ implementation enforcedPlatform(libs.jackson.bom)
- testImplementation platform(libs.jackson.bom)
seems does not work too.Chris Lee
06/11/2024, 1:49 PMBuild dependencies), pulled in by an OpenAPI Gradle plugin, at version 2.14.0 (difference than 2.14.2 using in other classpaths). May be worth confirming what specific jackson-core release added that enum value.Cheng Pan
06/11/2024, 1:53 PMCheng Pan
06/11/2024, 1:53 PMChris Lee
06/11/2024, 1:54 PMBuild Dependencies on the left barCheng Pan
06/11/2024, 1:55 PMCheng Pan
06/11/2024, 1:55 PMCheng Pan
06/11/2024, 1:57 PMChris Lee
06/11/2024, 1:59 PMCheng Pan
06/11/2024, 2:00 PMVampire
06/11/2024, 2:31 PMVampire
06/11/2024, 2:31 PMVampire
06/11/2024, 2:35 PMorg.apache.calcite.avatica:avatica:1.8.0 is misbehaving.
It re-packages an old version of jackson-core without shading it.
You have that dependency in your test classpaths and it comes in the classpath before the jackson-core dependency.
It does not contain com.fasterxml.jackson.core.json.JsonReadFeature, so the one from jackson-core is used.
com.fasterxml.jackson.core.json.JsonReadFeature of the newer jackson-core uses com.fasterxml.jackson.core.JsonParser.Feature.ALLOW_LEADING_PLUS_SIGN_FOR_NUMBERS in its static initialization.
com.fasterxml.jackson.core.JsonParser.Feature is taken from avatica but is so old that it of course does not have that constant, so it fails.Cheng Pan
06/11/2024, 2:40 PMavatica and tryVampire
06/11/2024, 2:41 PMVampire
06/11/2024, 2:41 PMCheng Pan
06/11/2024, 2:42 PMVampire
06/11/2024, 2:42 PMChris
06/11/2024, 2:45 PM-verbose:class is also a possibility⊠that way you can see which jar the offending class is coming fromVampire
06/11/2024, 2:47 PMVampire
06/11/2024, 2:48 PMCheng Pan
06/11/2024, 2:52 PMorg.apache.calcite.avatica:avatica