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

Getting Null Pointer Exception while accessing the data using a field other than id #265

Open
shakeelsiraj opened this issue Sep 13, 2019 · 3 comments

Comments

@shakeelsiraj
Copy link

{
"timestamp": "2019-09-13T02:48:00.755+0000",
"status": 500,
"error": "Internal Server Error",
"message": "No message available",
"trace": "java.lang.NullPointerException\r\n\tat java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)\r\n\tat java.util.concurrent.ConcurrentHashMap.containsKey(ConcurrentHashMap.java:964)\r\n\tat com.amazonaws.services.dynamodbv2.datamodeling.StandardModelFactories$StandardModelFactory.getTableFactory(StandardModelFactories.java:82)\r\n\tat com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper.getTableModel(DynamoDBMapper.java:392)\r\n\tat org.socialsignin.spring.data.dynamodb.core.DynamoDBTemplate.getTableModel(DynamoDBTemplate.java:223)\r\n\tat org.socialsignin.spring.data.dynamodb.repository.query.AbstractDynamoDBQueryCreator.create(AbstractDynamoDBQueryCreator.java:69)\r\n\tat org.socialsignin.spring.data.dynamodb.repository.query.AbstractDynamoDBQueryCreator.create(AbstractDynamoDBQueryCreator.java:42)\r\n\tat

@rohit-dantas-conichi
Copy link

was this ever resolved?

@soborskyi
Copy link

soborskyi commented Dec 12, 2019

You probably missing ConversionSchema set for DynamoDBMapperConfig. Try:
DynamoDBMapperConfig.builder().withConversionSchema(ConversionSchemas.V2_COMPATIBLE).
I faced exactly the same issue after changing builder from new DynamoDBMapperConfig.Builder() to DynamoDBMapperConfig.builder() <- the last one does not set defaults.

@IEnoobong
Copy link

Works for me!

You probably missing ConversionSchema set for DynamoDBMapperConfig. Try: DynamoDBMapperConfig.builder().withConversionSchema(ConversionSchemas.V2_COMPATIBLE). I faced exactly the same issue after changing builder from new DynamoDBMapperConfig.Builder() to DynamoDBMapperConfig.builder() <- the last one does not set defaults.

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

4 participants