设为首页 加入收藏

TOP

mybatis无效的列类型
2015-11-21 01:33:30 来源: 作者: 【 】 浏览:0
Tags: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.2cto.com/kf/ware/vc/" target="_blank" class="keylink">vcD4KPHA+PGltZyBzcmM9"https://www.cppentry.com/upload_files/article/57/1_0sdag__.png" alt="\">

原因:

MyBatis 插入空值时,需要指定JdbcType
mybatis insert空值报空值异常,但是在pl/sql不会提示错误,主要原因是mybatis无法进行转换


XML文件中SQL语句改为:


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇mongoDB基本使用(二) 下一篇夜维执行慢的原因探究

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: