DateFormat throws null Pointer in 4.2.x

Hi,
I am trying to upgrade spring data Elasticsearch from 4.1.10 to 4.2.2

I have a date field definition like below

@Field(type = FieldType.Date, format = DateFormat.date_optional_time, index = false)
private LocalDate executionDate

It works with spring data Elasticsearch 4.1.10 but fails in 4.2.x (4.2.0, 4.2.1, 4.2.2).
Getting the below error in bean creation of repository.

Caused by: java.lang.NullPointerException: Cannot invoke "java.lang.Class.isEnum()" because "componentType" is null

Have tried many formats.
Using the keyword "format" or "pattern" inside @Field throws this error.
Any suggestion would greatly help .

Thanks in advance.

can you share a full java class as well as a full stack trace, please. Thank you!

Thanks for the quick response Alexander.
The issue was due to a conflict in my ES version.

I have fixed the same.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.