Bug #102435 java.time.LocalDateTime cannot be cast to class java.lang.String
| Submitted: | 1 Feb 2021 9:55 | Modified: | 1 Feb 2021 12:58 |
|---|---|---|---|
| Reporter: | Patrik Schwieger | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | Connector / J | Severity: | S2 (Serious) |
| Version: | 8.0.23 | OS: | Any |
| Assigned to: | CPU Architecture: | Any |
[1 Feb 2021 9:55]
Patrik Schwieger
[1 Feb 2021 12:56]
Alexander Soklakov
Hi Patrik, Yes, that's the intended change, and we already added the note to the changelog https://dev.mysql.com/doc/relnotes/connector-j/8.0/en/news-8-0-23.html: Functionality Added or Changed -> Important -> "Also, with the implementation of the new mechanism, a getObject(columnIndex) call on a DATETIME column returns a LocalDateTime object now instead of a String. To receive a String like before, use getObject(columnIndex, String.class) instead."
[23 Feb 2021 1:07]
Scott Jibben
This change breaks the MySQL implementation in Adobe ColdFusion. For query resultsets, a java.time.LocalDateTime object is returned instead of a datetime string. Reverting to 8.0.22 fixed this problem.
[2 Mar 2021 22:06]
Adrian with an A
I used Spring Boot Parent Starter 2.4.3, which contains MySQL 8.0.23. Scenario 1: A clean database + start Spring Boot project = OK. Scenario 2: A clean database + start Spring Boot project = OK. Shut down project. Database has schema with data + start Spring Boot project = fail. Same problem as OP. Solution: Revert Spring Boot Starter Parent to 2.4.2. Scenario 1: Start and stop the project as many times as you would like. It will always work.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.051 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.