TimestampType.nullSafeGet(203) - could not read column value from result set: xxx; An SQLExc
生活随笔
收集整理的這篇文章主要介紹了
TimestampType.nullSafeGet(203) - could not read column value from result set: xxx; An SQLExc
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
hibernate項目在啟動時報錯如下:
TimestampType.nullSafeGet(203) - could not read column value from result set: xxx; An SQLException was provoked by the following failure: java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff]
顯示時間問題:查了下程序,xxx字段是正確的;
實體中的類型為Date;賦值使用的時 new Date();這些都沒有問題
后來查詢數據庫,值為Date 實際應該為DateTime
解決:
將數據庫中xxx字段更改為datetime類型
總結
以上是生活随笔為你收集整理的TimestampType.nullSafeGet(203) - could not read column value from result set: xxx; An SQLExc的全部內容,希望文章能夠幫你解決所遇到的問題。