-
Notifications
You must be signed in to change notification settings - Fork 141
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
Incompatible with AWS SDK 1.11.36 (Null Pointer Exception) #57
Comments
Thanks for the feedback. I will try to look into it on a short notice |
I just pushed out version Does the NPE still appears for you then? |
Hi derjust, Thanks for all your efforts. I had a chance to test this again but unfortunately the NPE still appears. This test was run with 4.5.0, Spring Boot 1.5.2.RELEASE, and AWS SDK 1.11.109 (1.11.93 has the same result too). Maybe the updating stack trace will provide some insight:
|
An example interface which causes the NPE: public interface ZDynamoRepository extends PagingAndSortingRepository<Z, Long> {
List<Z> findByXAndYLessThanEqual(@Param("x") Long x, @Param("y") Instant y);
} |
Got the same issue in a specific query format. The weird thing is that besides adding my configuration on DynamoDBMapperConfig bean it is ignored (getting null). |
I've run into the same/similar NPE issue. For me this seems to be caused by a custom DynamoDBMapperConfig to customize the table names. I didn't specify a TypeConverterFactory which is what causes the NPE. Unfortunately when using the Builder supplied by |
I worked in that area and there was the chance to cause it to be |
Issue #57: Fix compatibility with AWS SDK 1.11.36 (NullPointerException)
Will be part of |
When are you planning to release version 5.0.3? |
I am using 5.0.2 with Spring-data-dynamodb and the following configuration seems to work around the NPE problem and provided good results: First I annotated my bean accessor
I also setup an environment variable called ENV_PREFIX which is Spring wired via SpEL.
Then I setup a TableNameOverride bean:
Finally, I setup the DynamoDBMapperConfig bean using TableNameOverride injection.
In hind sight, I could have setup a DynamoDBTypeConverterFactory bean that returns a standard DynamoDBTypeConverterFactory and inject that into the getDynamoDBMapperConfig() method using the DynamoDBMapperConfig builder. But this will also do the job. |
A null pointer exception is being thrown by some dynamically generated queries. I believe the root cause of the problem is that the return types for some queries have changed. See the release notes below for details.
Compatibility with the latest version is required for the DynamoDBTypedConverted annotation fixes and updates.
Release Notes:
https://aws.amazon.com/releasenotes/4268484867346012
The text was updated successfully, but these errors were encountered: