software.amazon.awssdk:dynamodb:jar:2.13.52 Introduces a NoSuchFieldError: METRIC_PUBLISHERS
See original GitHub issueUpdating the aws-sdk-v2 that we are using in a maven project from 2.13.48
-> 2.13.75
specifically this package software.amazon.awssdk:dynamodb:jar:2.13.75 which looking at a mvn dependency:tree
brings in transitive dependencies of AWS SDK packages of a lesser value 2.13.19
which results into the following error during the execution of our integration tests.
java.lang.NoSuchFieldError: METRIC_PUBLISHERS
Looking through the SDK source repo I found references to this metric_publishers being added during this commit, https://github.com/aws/aws-sdk-java-v2/commit/c4346d2cc8d0f02ca60c36088b17e213ec859e1b, which was first introduced in 2.13.52
. When I switch back to 2.13.52
this error is still present though changing to the patch version right before that 2.13.51
doesn’t have this problem so this was introduced in the release of 2.13.52
and likely every patch version since that point. Reading the changelog of 2.13.52
I couldn’t see reference to this commit or the functionality introduced/fixed in it, https://github.com/aws/aws-sdk-java-v2/blob/master/CHANGELOG.md#21352-2020-07-07.
[INFO] +- software.amazon.awssdk:dynamodb:jar:2.13.75:compile
[INFO] | +- software.amazon.awssdk:aws-json-protocol:jar:2.13.19:compile
[INFO] | +- software.amazon.awssdk:protocol-core:jar:2.13.19:compile
[INFO] | +- software.amazon.awssdk:profiles:jar:2.13.19:compile
[INFO] | +- software.amazon.awssdk:sdk-core:jar:2.13.19:compile
[INFO] | +- software.amazon.awssdk:auth:jar:2.13.19:compile
[INFO] | +- software.amazon.awssdk:http-client-spi:jar:2.13.19:compile
[INFO] | +- software.amazon.awssdk:regions:jar:2.13.19:compile
[INFO] | +- software.amazon.awssdk:annotations:jar:2.13.19:compile
[INFO] | +- software.amazon.awssdk:utils:jar:2.13.19:compile
[INFO] | +- software.amazon.awssdk:aws-core:jar:2.13.19:compile
[INFO] | +- software.amazon.awssdk:metrics-spi:jar:2.13.75:compile
[INFO] | \- software.amazon.awssdk:apache-client:jar:2.13.19:runtime
[INFO] +- software.amazon.awssdk:netty-nio-client:jar:2.13.75:compile
Please advise what we are to do to be able to upgrade to these later patch versions.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (2 by maintainers)
Actually this happened again today on a newer version of dynamodb. I cleared my m2 and still reproducible. I’ll debug a bit more tomorrow or over the weekend, but other AWS ask packages aren’t having this problem for me. Maybe it is something in our maven proxy caching layer, but it is beginning to confuse me.
Found that one of the many parent pom’s were locking to a specific version via a bom. This is where the version differences were coming from and why later trying again worked due to other library version upgrades going into place.