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语句为:
实体类对应的属性设置为:<喎?http://www.Bkjia.com/kf/ware/vc/" target="_blank" class="keylink">vcD4KPHA+PGltZyBzcmM9"http://www.2cto.com/uploadfile/Collfiles/20150519/2015051910000013.png" alt="\">
原因:
MyBatis 插入空值时,需要指定JdbcType
mybatis insert空值报空值异常,但是在pl/sql不会提示错误,主要原因是mybatis无法进行转换
XML文件中SQL语句改为:
本站文章为和通数据库网友分享或者投稿,欢迎任何形式的转载,但请务必注明出处.
同时文章内容如有侵犯了您的权益,请联系QQ:970679559,我们会在尽快处理。