question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@DynamoDBIndexHashKey(globalSecondaryIndexName nullpointexception

See original GitHub issue

Hello, when i try a query by GSI, i have a nullpointerexception from amazon API

java.lang.NullPointerException
	at com.amazonaws.services.dynamodbv2.datamodeling.StandardModelFactories.rulesOf(StandardModelFactories.java:157)
	at com.amazonaws.services.dynamodbv2.datamodeling.StandardModelFactories.access$100(StandardModelFactories.java:53)
	at com.amazonaws.services.dynamodbv2.datamodeling.StandardModelFactories$StandardModelFactory.getTableFactory(StandardModelFactories.java:80)
	at com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper.getTableModel(DynamoDBMapper.java:393)
	at com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper.toParameters(DynamoDBMapper.java:1960)
	at com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper.toParameters(DynamoDBMapper.java:1949)

My code;

public interface FacturaRepository extends DynamoDBPagingAndSortingRepository<Factura, FacturaId> {
List<Factura> findByClaveFactura(String claveFactura);
}
 @DynamoDBIndexHashKey(globalSecondaryIndexName = "PK_FACTURA_INDEX", attributeName = "ClaveFactura")
 private String claveFactura;

The problem is in this class : com.amazonaws.services.dynamodbv2.datamodeling. StandardModelFactories and in the method **rulesof** and in this line because TypeConverterFactory from DynamoDBMapperConfig is null

final DynamoDBTypeConverterFactory.Builder scalars = config.getTypeConverterFactory().override();

So I create the TypeConvertFactory when I am creating the amazon client inside config objet but when i am debuging in the constructor of org.socialsignin.spring.data.dynamodb.core.DynamoDBTemplate TypeConverterFactory from dynamoDBMapperConfig is null

Regards.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
pluttrellcommented, Jun 5, 2017

@fpoolev Any updates on this issue?

I think this is a different issue than #57 because I can work around #57 by specifying the ConversionSchema as follows:

DynamoDBMapperConfig.builder()
        .withConversionSchema(ConversionSchemas.V2)
        .build();
0reactions
sfalicommented, Jul 9, 2018

I am also having this issue, any plan when to release 5.0.3.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Specify two index names @DynamoDbIndexHashkey ...
I am not getting how should I represent 2 index names (globalSecondaryIndexName) in in the @DynamoDBIndexHashKey attribute -
Read more >
Using DynamoDB on Spring Boot (feat.Kotlin)
In this post, I will talk about how to use Amazon DynamoDB with Spring Boot application made with Kotlin.
Read more >
aws/aws-sdk-java - Gitter
when i execute it i am getting nullpointerexception ... null, @get:DynamoDBIndexHashKey(globalSecondaryIndexName = "pendingOrders") var pending: Int? = null ...
Read more >
com.amazonaws.mobileconnectors.dynamodbv2 ... - Tabnine
@Test(expected = NullPointerException.class) public void testSaveException() ... @DynamoDBHashKey @DynamoDBIndexHashKey( globalSecondaryIndexNames ...
Read more >
Using DynamoDB on Spring Boot (feat.Kotlin) | Blackish
toString(), @field:DynamoDBAttribute(attributeName = "user_id") @field:DynamoDBIndexHashKey(globalSecondaryIndexName ... NullPointerException: null at ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found