'strange issue with coldfusion 2021 datetime as it shows java dump
I am using mysql and one of the column has a datetime datatype, when i do a output, it actually displays a java class,
https://prnt.sc/10sgstg
so why it is displaying a java class, do i need to cast something to understand it to display date or it is a bug
Solution 1:[1]
i changed the mysql j/connector and it started working, because in my case the connector was 8.0 and i was connecting to mysql 5.7
Solution 2:[2]
Using Mysql-connector-java-8.0.22.jar resolves this.
You can download it from here https://downloads.mysql.com/archives/c-j/
Unzip it and copy the .jar file to this location .../Coldfusion2021/cfusion/lib
Remove any existing Mysql-connector-java-xxxxxx.jar file from that folder
Restart Coldfusion
Dates should work as expected once again
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Jim |
Solution 2 | happysailingdude |