Skip to content

NoSuchMethodError using SqsLargeMessageAspect and PayloadS3Pointer #835

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

Closed
mtwrocky opened this issue Apr 15, 2022 · 8 comments
Closed

NoSuchMethodError using SqsLargeMessageAspect and PayloadS3Pointer #835

mtwrocky opened this issue Apr 15, 2022 · 8 comments
Labels
bug Something isn't working

Comments

@mtwrocky
Copy link

It basically has disabled our ability to submit events over 256KB

What were you trying to accomplish?

Expected Behavior

Running a test with upgrading from 1.4.0 to 1.12 powertools-sqs we hit this issue.
The expected behavior is the test should pass.

Current Behavior

Runtime error

Possible Solution

I think the change would be to change SqsLargeMessageAspect line 71 to match what the return is in PayloadS3Pointer or remove the PayloadS3Pointer from the jar file then this would match in what is in aws sqs extended 2.0.2

Steps to Reproduce (for bugs)

Basically provide data > 256KB to SqsUtils.enrichedMessageFromS3
Note: I am using Amazon Corretto 11

Environment

  • **Powertools version used 1.12 **:
  • Packaging format (Layers, Maven/Gradle):
    Gradle aspect ('software.amazon.lambda:powertools-sqs:1.12.0')
  • AWS Lambda function runtime:
  • Debugging logs

How to enable debug mode**

'java.util.Optional software.amazon.payloadoffloading.PayloadS3Pointer.fromJson(java.lang.String)': java.lang.NoSuchMethodError
java.lang.NoSuchMethodError: 'java.util.Optional software.amazon.payloadoffloading.PayloadS3Pointer.fromJson(java.lang.String)'
at software.amazon.lambda.powertools.sqs.internal.SqsLargeMessageAspect.processMessages(SqsLargeMessageAspect.java:71)
at software.amazon.lambda.powertools.sqs.SqsUtils.enrichedMessageFromS3(SqsUtils.java:80)

@mtwrocky mtwrocky added the bug Something isn't working label Apr 15, 2022
@pankajagrawal16
Copy link
Contributor

Thanks for reporting this @mtwrocky . I will have a look at this.

@pankajagrawal16
Copy link
Contributor

Hey @mtwrocky , Does your Lambda function project also depends on payloadoffloading-common library? It seems these two conflicts. Powertools in itself does not require payloadoffloading-common anymore, so is there a reason why project depends upon it?

@mtwrocky
Copy link
Author

mtwrocky commented Apr 21, 2022 via email

@pankajagrawal16
Copy link
Contributor

Ok I understand. I would be very interested in learning from where payloadoffloading-common dependency is being pulled in. As far as I can see, V2 SDK, does not directly depend upon it but might be its pulling it inn transitively. Would it be possible for you to look at dependency tree for the project? If the project does not use it, then the issue should be fixed by excluding it. That being said, I will also look into the possibilities of how we can solve this dependency conflict in powertools itself.

@mtwrocky
Copy link
Author

mtwrocky commented Apr 22, 2022 via email

@pankajagrawal16
Copy link
Contributor

Ok i understand, so does the application/consumer lambda function need to depend on SQS Extended client lib ?

@mtwrocky
Copy link
Author

mtwrocky commented Apr 22, 2022 via email

@github-actions
Copy link
Contributor

This is now released under 1.12.2 version!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants