-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Unable to use DynamoDB SDK in a Graal native image because of Cannot construct instance of com.amazonaws.partitions.model.Partitions
(no Creators, like default construct, exist)
#1022
Comments
I was able to succesfully execute the
steps. How can I test this locally, without requiring an aws account. I tried to go to |
Hi @cstancu, I've prepared a simplified project so that you can test it in a local environment: https://github.com/codependent/graal-app Project setup:
To run the app just execute The first time the request may take a while until it downloads the lambda docker image:
I've extracted the functionality into a controller that passes a json to the object mapper getting the same exception:
Exception:
|
Thank you for the easy to use reproducible. I updated it to use I was able to get past the jackson errors by adding these entries to
I came up with the list of classes that need reflective access by painstakingly following the When I go to |
I appreciate your taking the time to help me work this out. I'll be great I you end up detecting reflectively accessed elements automatically. In the meantime I'll take this into account for similar cases. Thanks again!! |
The same issue occurring for aws-java-sdk-cognitoidentity:1.11.887.Is issue fixed for all or specficy to DynamoDb? |
do you have the neweast source? i want to try your source |
|
This problem is similar to the issue: #848
The full context is available in a StackOverflow question, where there's also a link to a Github sample project: https://stackoverflow.com/questions/54931286/micronaut-serverless-application-using-dynamodb-and-graal-custom-runtime-throws
Summing up:
In my native image running on a AWS lambda custom runtime I call some DynamoDB tables. The problem is in com.amazonaws.partition.PartitionsLoader.loadPartitionFromStream() they invoke jackson to unmarshal an endpoints.json file into a com.amazonaws.partitions.model.Partitions object.
This ends up throwing this exception:
I have tried adding into reflect.json file, as suggested in the other issue:
The text was updated successfully, but these errors were encountered: