awslabs / amazon-dynamodb-local-samples

This is a sample Java project that demonstrates how to use DynamoDB Local for local development and testing
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html
MIT No Attribution
15 stars 9 forks source link

DynamoDB Local has jetty version incompatible with upcoming Spring Boot 3.2 jetty version #4

Closed artur1211 closed 8 months ago

artur1211 commented 1 year ago

There is an incompatibility between jetty versions in the upcoming Spring Boot 3.2 (it brings 12.0.1 jetty with it) and DynamoDB Local 2.0.0 (contains jetty in version 11.0.15). When one tries to run DynamoDB Local on the jetty (12.0.1) taken from Spring Boot 3.2 it leads to the following exception:

java.lang.IllegalAccessError: class com.amazonaws.services.dynamodbv2.local.server.DynamoDBProxyServer tried to access protected method 'void org.eclipse.jetty.server.Handler$AbstractContainer.<init>()' (com.amazonaws.services.dynamodbv2.local.server.DynamoDBProxyServer and org.eclipse.jetty.server.Handler$AbstractContainer are in unnamed module of loader 'app')
    at com.amazonaws.services.dynamodbv2.local.server.DynamoDBProxyServer.setUpHandler(DynamoDBProxyServer.java:50)
    at com.amazonaws.services.dynamodbv2.local.server.DynamoDBProxyServer.<init>(DynamoDBProxyServer.java:37)
        at...

It would be great if you could update Jetty to 12.0.1 (Spring Boot 3.2 version)

shetsa-amzn commented 1 year ago

We appreciate your feedback and we are currently reviewing this. We will update as soon as we have more information about next steps.

ssanganbatte commented 11 months ago

Hi, I am also facing the same issue. When can we expect the fix!!

marat-aukhadiev-andsafe commented 11 months ago

Any progress on the issue? Is there a workaround?

ssanganbatte commented 11 months ago

I have updated my pom.xml to include the 11.x.x version instead of 12.x.x and scope to test. As I was using only for local testing and it worked for me.

org.eclipse.jetty jetty-server 11.0.18 test org.eclipse.jetty jetty-util 11.0.18 test org.eclipse.jetty jetty-io 11.0.18 test org.eclipse.jetty jetty-http 11.0.18 test
shetsa-amzn commented 10 months ago

Hi, we currently have this planned in our issues backlog. We do not have an ETA, but it is being prioritized. We will provide a status update once this is in progress.

harrydhillon43 commented 9 months ago

Facing the same issue as well

klach-ocado commented 9 months ago

Is there a workaround?

An alternative way to obtain a mock client that does not use HTTP connections at all (so methods like com.amazonaws.AmazonWebServiceResult#getSdkHttpMetadata return null):

AmazonDynamoDB amazonDynamoDB = DynamoDBEmbedded.create().amazonDynamoDB();
psiman-wandera commented 9 months ago

Hi, we are facing the same issue. Any ETA of the fix would help a lot. Thanks!

esagardia commented 9 months ago

Same here. is there any active work for this ? Thank you

chris-tuncap commented 9 months ago

Same here. We had to upgrade our Spring Boot to 3.2+ to resolve a vulnerability and we encountered this. Any idea when this will be worked? :)

shetsa-amzn commented 8 months ago

Hello Customers,

@artur1211 @ssanganbatte @marat-aukhadiev-andsafe @harrydhillon43 @klach-ocado @psiman-wandera @esagardia @chris-tuncap

The DynamoDB DevEx team is continuously making improvements to DynamoDB local. As we have received feedback from you as a user of DynamoDB local as a Maven dependency. Our latest improvement to DynamoDB local is an upgrade to Jetty 12 to be compatible with Spring Boot 3.2.0. We are reaching out to you to see if you would like to participate in the early testing of our DynamoDB local beta version, which includes this upgrade. We would really appreciate your support as your participation will help us ensure high quality user experience with this upgrade before we launch to the general public.

If you would like to participate in early testing of our DynamoDB local beta release, please send us an email at: aws-ddblocal-feedback@amazon.com.

Regards, The DynamoDB DevEx Team

shetsa-amzn commented 8 months ago

Today, we are excited to announce that DynamoDB local for Amazon DynamoDB upgrades to Jetty 12 and JDK 17. We recommend that you run the latest version (2.3.0) of DynamoDB local to utilize the most recent updates and features of DynamoDB local for your development and testing use cases.

https://aws.amazon.com/about-aws/whats-new/2024/03/amazon-dynamodb-local-upgrades-jetty-12-jdk-17/

psiman-wandera commented 8 months ago

@shetsa-amzn thanks for quick fix of this issue 👏

Today, we are excited to announce that DynamoDB local for Amazon DynamoDB upgrades to Jetty 12 and JDK 17. We recommend that you run the latest version (2.3.0) of DynamoDB local to utilize the most recent updates and features of DynamoDB local for your development and testing use cases.

https://aws.amazon.com/about-aws/whats-new/2024/03/amazon-dynamodb-local-upgrades-jetty-12-jdk-17/