You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
iquibase.exception.LockException: java.lang.ClassCastException: class java.time.OffsetDateTime cannot be cast to class java.util.Date (java.time.OffsetDateTime and java.util.Date are in module java.base of loader 'bootstrap') at liquibase.lockservice.StandardLockService.listLocks(StandardLockService.java:452)
I think best way would be to also Handle OffsetDateTime als an alternative to LocalDateTime and Date.
When Liquibase fires, it doesn't use JPA (Hibernate). It solely works at the JDBC level, AFAIK.
So a change to how Hibernate does things would be completely irrelevant to Liquibase.
Search first
Description
Using liquibase 4.23.0 in Spring Boot 3.1.1 coming with Hibernate 6.2
there were changes with Hibernate storing Time. It now maps time related Values to
OffsetDateTime
. The Methodliquibase.lockservice.StandardLockService#listLocks (https://github.com/liquibase/liquibase/blob/master/liquibase-standard/src/main/java/liquibase/lockservice/StandardLockService.java) can only handle
LocalDateTime
andDate
. This results in and LockException with a ClassCastException as root:iquibase.exception.LockException: java.lang.ClassCastException: class java.time.OffsetDateTime cannot be cast to class java.util.Date (java.time.OffsetDateTime and java.util.Date are in module java.base of loader 'bootstrap') at liquibase.lockservice.StandardLockService.listLocks(StandardLockService.java:452)
I think best way would be to also Handle OffsetDateTime als an alternative to
LocalDateTime
andDate
.Downgrading Hibernate again to 6.1 this works.
Steps To Reproduce
liquibase.lockservice.StandardLockService#listLocks
Expected/Desired Behavior
Returning current active Locks.
Liquibase Version
4.23.0
Database Vendor & Version
H2
Liquibase Integration
maven, springboot, hibernate
Liquibase Extensions
No response
OS and/or Infrastructure Type/Provider
No response
Additional Context
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: