Skip to content
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

Using DynamoDB client (with URLConnection client) results in an error #605

Closed
ducampbe opened this issue Oct 14, 2020 · 0 comments
Closed

Comments

@ducampbe
Copy link
Contributor

Steps to Reproduce

  1. Create a new project from the micronaut-cli with support for AWS SDK v2 & AWS Lambda
  2. Add the following to the build.gradle
 implementation("software.amazon.awssdk:dynamodb") {
        exclude group: "software.amazon.awssdk", module: "apache-client"
        exclude group: "software.amazon.awssdk", module: "netty-nio-client"
}
implementation('software.amazon.awssdk:url-connection-client')
  1. In one of the unit tests, attempt to inject DynamoDBClient into the class and execute the unit test

Expected Behaviour

The unit test should complete successfully with no errors and the class should contain an instance of DynamoDBClient initialised with the synchronous client (URLConnection)

Actual Behaviour

The unit test fails with an error complaining that No bean of type [software.amazon.awssdk.http.async.SdkAsyncHttpClient] exists

Fix

It appears the async factory methods in DynamoDBClientFactory are missing the @Requires(beans = SdkAsyncHttpClient.class) annotation which appears in the other AWS factory classes (S3, SNS, etc.). PR to follow.

Environment Information

  • Operating System: Linux desktop-i3 5.8.11-1-MANJARO #1 SMP PREEMPT Wed Sep 23 14:35:40 UTC 2020 x86_64 GNU/Linux
  • Micronaut Version: 2.1.1
  • JDK Version: openjdk 11.0.8 2020-07-14

Example Application

ducampbe added a commit to ducampbe/micronaut-aws that referenced this issue Oct 14, 2020
…Client when the async http clients have been explicitly excluded from the build
ilopmar pushed a commit that referenced this issue Oct 15, 2020
…ync http clients have been explicitly excluded from the build (#606)
@ilopmar ilopmar closed this as completed Oct 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants