DateTimeException occurred "yyyy-MM-dd HH: mm: ss" string is converted to Date [DATAES-953] #1527
Here is entity field
Without any other configuration, I can write it to Elasticsearch, but I can't read. The following exception occurred
The whole stack is in there： [^exception stack.txt]
By the way, I think the problem is in 'ElasticsearchDateConverter.parse(String)'
Instant can‘t use the result of 'dateFormatter.parse(input)' as a parameter to execute the from method. It should just like 'JavaDateFormatter.format' do.
Convert TemporalAccessor to ZonedDateTime by 'DateFormatters.from' , and then Instant.from(ZonedDateTime).
'ElasticsearchDateConverter.parse(String)' is modified as follows
The above is my opinion, I hope the problem can be solved. Thank you!
Affects: 4.0.4 (Neumann SR4), 4.1 RC2 (2020.0.0)
Referenced from: pull request #538
Backported to: 4.0.5 (Neumann SR5)
The text was updated successfully, but these errors were encountered:
You should use "uuuu" instead of "yyyy" in your pattern. See the documentation at
, there in the info box
btw, why not use
Thanks for your comment. And I try the 'uuuu' instead, but it still doesn't work either. :(
Here is all stack [^exception stack_uuuu.txt]
I think the result of 'dateFormatter.parse(input)' must be converted to ZonedDateTime by 'DateFormatters.from' ;)
As for why not use Instant from the
Of course, if the format is changed to 'date_hour_minute_second', it work well and It's just that the time format stored in the database is slightly different.
But the Date type seems to be a problem. So I want to confirm with you.