# Execute Changelogs. Reason: java.lang.ClassCastException: java.time.LocalDateTime cannot be cast to java.util.Date

**URL:** <https://forum.liquibase.org/t/execute-changelogs-reason-java-lang-classcastexception-java-time-localdatetime-cannot-be-cast-to-java-util-date/7020>\
**Category:** Liquibase Development\
**Tags:** mysql, changelog\
**Created:** [June 28, 2022, 7:32pm UTC](https://forum.liquibase.org/t/execute-changelogs-reason-java-lang-classcastexception-java-time-localdatetime-cannot-be-cast-to-java-util-date/7020 "2022-06-28T19:32:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jwsql2019](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@jwsql2019](https://forum.liquibase.org/u/jwsql2019)\
**Post date:** [June 28, 2022, 7:32pm UTC](https://forum.liquibase.org/t/execute-changelogs-reason-java-lang-classcastexception-java-time-localdatetime-cannot-be-cast-to-java-util-date/7020/1 "2022-06-28T19:32:31Z")

</div>

Liquibase changelogs are failing deployment with the following error:

`Execute Changelogs. Reason: java.lang.ClassCastException: java.time.LocalDateTime cannot be cast to java.util.Date`

And our app is set up using Liquibase 4.3.3, Spring Boot 2.3.12, Java 1.8, and ‘mysql-connector-java’ 5.1.47.

I am not sure what’s causing this issue, I think liquibase is trying to update the ‘DATEEXECUTED’ column in the ‘databasechangelog’ table as it’s trying to execute the first change log file and the JDBC connection is now doing this datetime casting automatically (not sure if it happened behind the scenes when using the previous version of Liquibase to deploy the same change logs previously) but it’s happening now for some reason when Liquibase is started up.

Any guidance on this issue would be greatly appreciated.

Thanks.

---

<div class="post-metadata">

**Author:** ![tabbyfoo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/tabbyfoo/32/748_2.png) [@tabbyfoo](https://forum.liquibase.org/u/tabbyfoo)\
**Post date:** [July 8, 2022, 2:45pm UTC](https://forum.liquibase.org/t/execute-changelogs-reason-java-lang-classcastexception-java-time-localdatetime-cannot-be-cast-to-java-util-date/7020/2 "2022-07-08T14:45:06Z")

</div>

> [@jwsql2019](#):
>
> ava.lang.ClassCastException: java.time.LocalDateTime cannot be cast to java.util.Date

This has historically been caused by a versioning issue between Liquibase and MySQL. We recommend updating to the latest version, which can be found on our docs site below.

Reference:

> **[Install Liquibase](https://docs.liquibase.com/start/install/home.html)**
>
> You can install Liquibase on Windows, MacOS, and Linux/Unix systems.

> <https://stackoverflow.com/questions/66787654/class-java-time-localdatetime-cannot-be-cast-to-class-java-lang-string>
