oracle无效列的列类型,oracle 无效的列类型: 1111
oracle 数据库出现Exception in thread "main" org.springframework.jdbc.UncategorizedSQLException: Error setting null for parameter #6 with JdbcType OTHER . Try setting a different JdbcType for this parameter
oracle 数据库出现
Exception in thread "main" org.springframework.jdbc.UncategorizedSQLException: Error setting null for parameter #6 with JdbcType OTHER . Try setting a different JdbcType for this parameter or a different jdbcTypeForNull configuration property. Cause: java.sql.SQLException: 无效的列类型: 1111
; uncategorized SQLException for SQL []; SQL state [99999]; error code [17004]; 无效的列类型: 1111; nested exception is java.sql.SQLException: 无效的列类型: 1111
只需在mybatis xml 文件中 添加jdbcType 即可,原因是 插入空值时 mybatis 无法转换
insert into customer_log
(
ID,
CUSTOMER_SERVICE_USER_NAME,
user_name ,
CONTENT,
LOG_FIRST_TYPE,
STATUS,
LINKED_ID,
FEE,
ACCOUNT_FIRST_TYPE,
ACCOUNT_SECOND_TYPE,
ACCOUNT_THIRD_TYPE,
LOG_SECOND_TYPE,
LOG_IP,
MEMO
)
values
(
seq_customer_log.nextval ,
#{customerServiceUserName,jdbcType=VARCHAR} ,
#{username,jdbcType=VARCHAR},
#{content,jdbcType=VARCHAR},
#{logFirstType,jdbcType=NUMERIC},
#{status,jdbcType=NUMERIC},
#{linkedId,jdbcType=VARCHAR},
#{fee,jdbcType=NUMERIC},
#{accountFirstType,jdbcType=NUMERIC},
#{accountSecondType,jdbcType=NUMERIC},
#{accountThirdType,jdbcType=NUMERIC},
#{logSecondType,jdbcType=NUMERIC},
#{logIp,jdbcType=VARCHAR},
#{memo,jdbcType=VARCHAR}
)
解决办法参考以下博客 谢谢奉献 http://makemyownlife.iteye.com/blog/1610021
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐


所有评论(0)