-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Removal of PASCAL_CASE_TO_CAMEL_CASE creates compatibility problems #2897
Comments
Hi @skohlmann! Yes, thank you for reporting this -- release candidates are meant to find out accidental changes like this. |
I do not know what is happening here but with AWS
AWS code is:
So was it fixed at all? Or breaking change redone after fix? Any sync with AWS guys? |
Workaround seems to be |
@hohwille why not use aws 2.24.x or 2.23.x? The AWS code was changed - see https://github.com/aws/aws-sdk-java/blob/master/aws-java-sdk-core/src/main/java/com/amazonaws/util/EC2MetadataUtils.java |
@pjfanning thanks for pointing that out. Usually the first thing I do when adding a dependency is checking maven central for the latest version. Indeed the version |
The reason I can't update AWS SDK versions is because I am using the Camel AWS integration and cannot upgrade that at the moment. Better for Jackson to preserve the API for minor library upgrades, as per Semantic Versioning conventions. When Jackson moves to 3.x, a major version change, then these kinds of breaking changes can be expected. |
In general, tho, we do try to keep compatibility in a way like you suggest. But at this point, field has been removed tho and trying to add it back would be even more confusing as some intermediate versions wouldn't have it. |
I am having the same issue with jackson v 2.17.0 and aws sdk 2.25.17 (latest as today) |
HI @cowtowncoder. It worked with 2.15.4 so most likely the fix wasn't merged in 2.17.0 even though is more recent than the fix. |
@danjee at this point there isn't anything planned to be changed on Jackson side. Not sure what "it worked" here specifically means, but it sounds like newer version of AWS client works with newer versions of Jackson so that's probably the way forward. |
I've tried with the latest aws sdk version2.25.17 (latest as yesterday) and jackson 2.17.0 as I've stated in the previous comment and the error popped up. Downgrading jackson lib to 2.15.2 and keeping the aws lib to 2.25.17 (latest as yesterday) it "worked" as in the error didn't appeared.
My guess was that for 2.15.2 the fix was applied and for 2.17.0 it wasn't. |
No, there was no fix in 2.15.2 -- but rather already deprecated (in 2.7) field was finally removed from 2.16. Assumption being that since it has been deprecated for so long -- with a compatible replacement since 2.7, to upgrade to -- no client would be using field any longer. Looks like this was being optimistic. But given this, there are multiple releases without said deprecated field and it will not be reintroduced. Dependant libraries/frameworks need to use the replacement strategy. AWS sdk must be upgraded to use the new |
btw, which AWS sdk library are we talking about? https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-core has version only to 1.12.x |
https://mvnrepository.com/artifact/software.amazon.awssdk/s3/2.25.17 - I see that they made 2.25.18 the same day. I'll try that too. Thanks |
@danjee Did it work out? And if so, which Jackson version does it depend on (MvnRepository does not show Jackson as direct dependency and I couldn't figure out which transitive dep would show it). |
This is required because v1.0.0-M15 depends on software.amazon.awssdk:dynamodb:2.15.78 which depends on jackson-databind:2.10.5.1, which is binary incompatible with jackson-databind:2.16.2 which is depended on by com.amazonaws:aws-java-sdk-core:1.12.470. Scanamo v1.0.0 uses software.amazon.awssdk:dynamodb:2.23.4 See FasterXML/jackson-databind#2897
This is required because v1.0.0-M15 depends on software.amazon.awssdk:dynamodb:2.15.78 which depends on jackson-databind:2.10.5.1, which is binary incompatible with jackson-databind:2.16.2 which is depended on by com.amazonaws:aws-java-sdk-core:1.12.470. Scanamo v1.0.0 uses software.amazon.awssdk:dynamodb:2.23.4 See FasterXML/jackson-databind#2897
This is required because v1.0.0-M15 depends on software.amazon.awssdk:dynamodb:2.15.78 which depends on jackson-databind:2.10.5.1, which is binary incompatible with jackson-databind:2.16.2 which is depended on by com.amazonaws:aws-java-sdk-core:1.12.470. Scanamo v1.0.0 uses software.amazon.awssdk:dynamodb:2.23.4 See FasterXML/jackson-databind#2897
This is required because v1.0.0-M15 depends on software.amazon.awssdk:dynamodb:2.15.78 which depends on jackson-databind:2.10.5.1, which is binary incompatible with jackson-databind:2.16.2 which is depended on by com.amazonaws:aws-java-sdk-core:1.12.470. Scanamo v1.0.0 uses software.amazon.awssdk:dynamodb:2.23.4 See FasterXML/jackson-databind#2897
Describe the bug
The removal of
com.fasterxml.jackson.databind.PropertyNamingStrategy#PASCAL_CASE_TO_CAMEL_CASE
creates problems within AWS environments. The field is referenced bycom.amazonaws.util.EC2MetadataUtils
(transitive reference incom.amazonaws:aws-java-sdk-core:jar:1.11.883
) and raise a NoSuchFieldError if overwriting the Jackson environment of AWScom.amazonaws:aws-java-sdk-core
(which is Jackson 2.6.7).Version information
2.12.0-rc1
To Reproduce
Call
com.amazonaws.services.sqs.AmazonSQSClientBuilder#defaultClient()
(of packagecom.amazonaws:aws-java-sdk-sqs:jar:1.11.883
) withcom.fasterxml.jackson.core:jackson-databind:jar:2.12.0-rc1
.Expected behavior
There is no NoSuchFieldError in combination of com.amazonaws:aws-java-sdk-core and Jackson.
The text was updated successfully, but these errors were encountered: