Caused by: java.lang.IllegalArgumentException: HOUR_OF_DAY: 2 -> 3

开始以为是 某个时间参数有问题,后来google发现如果在数据库配置文件中加上

&serverTimezone=Asia/Shanghai

即可,可能是mysql驱动问题,没有验证

Caused by: java.lang.IllegalArgumentException: HOUR_OF_DAY: 2 -> 3
	at java.util.GregorianCalendar.computeTime(GregorianCalendar.java:2829)
	at java.util.Calendar.updateTime(Calendar.java:3393)
	at java.util.Calendar.getTimeInMillis(Calendar.java:1782)
	at com.mysql.cj.jdbc.io.JdbcTimestampValueFactory.createFromTimestamp(JdbcTimestampValueFactory.java:92)
	at com.mysql.cj.jdbc.io.JdbcTimestampValueFactory.createFromTimestamp(JdbcTimestampValueFactory.java:39)
	at com.mysql.cj.core.io.BaseDecoratingValueFactory.createFromTimestamp(BaseDecoratingValueFactory.java:54)
	at com.mysql.cj.core.io.BaseDecoratingValueFactory.createFromTimestamp(BaseDecoratingValueFactory.java:54)
	at com.mysql.cj.core.io.MysqlTextValueDecoder.decodeTimestamp(MysqlTextValueDecoder.java:177)
	at com.mysql.cj.mysqla.result.AbstractResultsetRow.decodeAndCreateReturnValue(AbstractResultsetRow.java:67)
	at com.mysql.cj.mysqla.result.AbstractResultsetRow.getValueFromBytes(AbstractResultsetRow.java:225)
	at com.mysql.cj.mysqla.result.TextBufferRow.getValue(TextBufferRow.java:122)
	at com.mysql.cj.jdbc.result.ResultSetImpl.getNonStringValueFromRow(ResultSetImpl.java:630)
	at com.mysql.cj.jdbc.result.ResultSetImpl.getDateOrTimestampValueFromRow(ResultSetImpl.java:643)
	at com.mysql.cj.jdbc.result.ResultSetImpl.getTimestamp(ResultSetImpl.java:939)
	at com.mysql.cj.jdbc.result.ResultSetImpl.getTimestamp(ResultSetImpl.java:980)
	at com.alibaba.druid.filter.FilterChainImpl.resultSet_getTimestamp(FilterChainImpl.java:909)
	at com.alibaba.druid.filter.FilterAdapter.resultSet_getTimestamp(FilterAdapter.java:1796)
	at com.alibaba.druid.filter.FilterChainImpl.resultSet_getTimestamp(FilterChainImpl.java:907)
	at com.alibaba.druid.proxy.jdbc.ResultSetProxyImpl.getTimestamp(ResultSetProxyImpl.java:741)
	at com.alibaba.druid.pool.DruidPooledResultSet.getTimestamp(DruidPooledResultSet.java:366)
	... 68 more

 

转载于:https://my.oschina.net/renshengwudi/blog/1489127

你可能感兴趣的:(Caused by: java.lang.IllegalArgumentException: HOUR_OF_DAY: 2 -> 3)