mybatis 無效的列類型,mybatis無效

來源:互聯網
上載者:User

mybatis 無效的列類型,mybatis無效

項目報錯為:
[FaultEvent fault=[RPC Fault faultString="org.springframework.jdbc.UncategorizedSQLException : Error setting null parameter.  Most JDBC drivers require that the JdbcType must be specified for all nullable parameters. Cause: java.sql.SQLException: 無效的列類型; uncategorized SQLException for SQL []; SQL state [null]; error code [17004]; 無效的列類型; nested exception is java.sql.SQLException: 無效的列類型" faultCode="Server.Processing" faultDetail="null"] messageId="406BB9C8-A70D-B31C-65E7-573E4B6DDBB4" type="fault" bubbles=false cancelable=true eventPhase=2]


XML檔案updateSQL語句為:


實體類對應的屬性設定為:


原因:

MyBatis 插入空值時,需要指定JdbcType 
mybatis insert空值報空值異常,但是在pl/sql不會提示錯誤,主要原因是mybatis無法進行轉換


XML檔案中SQL語句改為:


聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.