Unable to retrieve the timestamp field after upgrading to Mysql connector for java 8.0.30
Posted by: Saravanan Balarishnan
Date: August 08, 2023 06:08AM

Hi All,

Recently we upgraded our MySQL connector from 5.1.x to 8.0.30 to accommodate the DB server upgrade. After the connector upgrade, application is unable to retrieve the timestamp value from the backend facing IllegalArgumentException from Java Gregorian Calendar API.

Our application and DB server runs on Singapore (GMT+8) Timezone. This exception is happening only for the timestamps when there was offset change happened in Singapore (https://en.wikipedia.org/wiki/Singapore_Standard_Time#Timeline).

Example:

Timestamp in DB - 1982-01-01 00:00:00

Exception when trying to retrieve the timestamp from application - Caused by: java.lang.IllegalArgumentException: MINUTE: 0 -> 30
at java.util.GregorianCalendar.computeTime(GregorianCalendar.java:2829)

Tried using serverTimeZone, connectionTimeZone in the connection url but still the issue persists.

Any help is highly appreciated.

Thanks

Options: ReplyQuote


Subject
Written By
Posted
Unable to retrieve the timestamp field after upgrading to Mysql connector for java 8.0.30
August 08, 2023 06:08AM


Sorry, you can't reply to this topic. It has been closed.

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.