Error on transformation software.amazon.awssdk.core.internal.handler.BaseAsyncClientHandler

APM Agent language and version:
Java 1.43.0

Description of the problem including expected versus actual behavior.
After upgrading the AWS SDK v2 in our spring boot service from 2.20.162 to 2.21.0 we see the following message during startup that did not happen before:

2023-10-18 06:26:05,586 [main] WARN  co.elastic.apm.agent.bci.bytebuddy.ErrorLoggingListener - Error on transformation software.amazon.awssdk.core.internal.handler.BaseAsyncClientHandler
java.lang.IllegalStateException: Cannot locate field named clientConfiguration for class software.amazon.awssdk.core.internal.handler.BaseAsyncClientHandler
	at net.bytebuddy.asm.Advice$OffsetMapping$ForField$Unresolved.resolve(Advice.java:2556) ~[elastic-apm-agent-40510175845988f13f6162ed8526f0b0-a9910a9589b2cceb9a41936e297bb41c.jar:1.43.0]
	at net.bytebuddy.asm.Advice$OffsetMapping$ForField.resolve(Advice.java:2481) ~[elastic-apm-agent-40510175845988f13f6162ed8526f0b0-a9910a9589b2cceb9a41936e297bb41c.jar:1.43.0]
...

As a consequence, traces that contain communication over SQS stop after an SQS message was sent and the spans after receiving the message are missing.

Steps to reproduce

  1. Start a spring boot service that uses the APM Java agent 1.43.0 and the AWS Java SDK 2.20.162
  2. Trigger a transaction that sends a message via SQS to another service with the same dependency versions
  3. Check the corresponding trace in Kibana

Expected behavior
No error message on startup.
Traces continue after SQS message is received.

Actual behavior
Error at service startup.
Received SQS messages are not visible in their corresponding trace.

Addtional information
I think the relevant change in the AWS Java SDK is this

Looking at the "Cannot locate field named clientConfiguration" part of the error to me it seems the root cause is that clientConfiguration has been removed from the derived class and only exists on the base class now where it's private.

Edit 2024-05-16: somehow this topic got flagged as spam?!? Editing it to unhide it...

Hi @IngoStrauch2020 ,
Yes, indeed, there have been changes in the new version of the aws sdk. Today I will send a hotfix to solve this problem.

1 Like

@IngoStrauch2020 You can follow this PR for updates.

1 Like

Thank you so much, will report back once we've updated to the fixed version.

The PR got merged about a month ago but it seems there was no release since then.
Do you have an estimate when the next version will come?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.