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
java.lang.ClassCastException: class java.time.Instant cannot be cast to class java.time.chrono.ChronoLocalDateTime #12311
Comments
Hi @ebuildy |
|
How do values of this field look like? I managed to reproduce such an error when what gets returned from the DB is a mix of strings and numbers (presumably ms from epoch). |
Yes you are probably right. MongoDB have no schema/mapping field type, hence, field value can be messed up, in my case, I am pretty sure this is the case. |
During fingerprinting, we can end up trying to compare two datatypes that are not comparable - ChronoLocalDateTime and Instant. Coerce the ChronoLocalDateTime to a proper Instant for the comparison to work. When earliest / latest are called, the acc parameter must be coerced to a Temporal object also. Resolves #12311 [ci all]
* Handle comparing ChronoLocalDateTime and Instants During fingerprinting, we can end up trying to compare two datatypes that are not comparable - ChronoLocalDateTime and Instant. Coerce the ChronoLocalDateTime to a proper Instant for the comparison to work. When earliest / latest are called, the acc parameter must be coerced to a Temporal object also. Resolves #12311 [ci all] * making ->temporal recursive * Get the timezone in an precedence order When converting a LocalTime for fingerprinting, convert to an Instant using the following precedence order: * report timezone * database timezone * system timezone [ci all] * use UTC for timezones
Describe the bug
A Java bug while generating field fingerprint :
logs
To Reproduce
I dont know what it cause the exception,
deletedAt
is a classic Date field (and it works fine for other field).Expected behavior
fingerprint field should success
Severity
field cannot be used
Additional context
MongoDB as data base
The text was updated successfully, but these errors were encountered: