mybatis存储null到oracle报错问题
来源:互联网 发布:软件工程品质数据 编辑:程序博客网 时间:2024/05/10 11:23
使用oracle,在保存用户时,有两个属性分别是String和Date,默认为null,存储时会报如下错误:
无效的列类型: 1111
Error setting null parameter. Most JDBC drivers require that the JdbcType must be specified for all nullable parameters. Cause: java.sql.SQLException: 无效的列类型: 1111
### Error updating database. Cause: org.apache.ibatis.type.TypeException: Error setting null parameter.
经过朋友帮助解决,问题是:在oracle中的null为不确定的意思,存储null时,mybatis解析不到oracle字段类型
解决方法:在插入语句中,加入jdbcType,如下:
#{loginIp,jdbcType=VARCHAR},
#{name,jdbcType=VARCHAR},
经过朋友帮助解决,问题是:在oracle中的null为不确定的意思,存储null时,mybatis解析不到oracle字段类型
解决方法:在插入语句中,加入jdbcType,如下:
#{loginIp,jdbcType=VARCHAR},
#{name,jdbcType=VARCHAR},
0 0
- mybatis存储null到oracle报错问题
- mybatis存储null到oracle报错问题
- mybatis存储null到oracle报…
- myBatis将null作为参数传递报错问题
- mybatis在insert时,实体类字段为null时,报错问题
- 解决mybatis在oracle中null的问题
- mybatis匹配方法返回NULL导致报错
- mybatis映射问题,报错Error instantiating null with invalid types () or values (). Cause:java.lang.NullPoint
- oracle报错问题
- Cocos2dx移植到Android报错问题,原因getIntegerForKey数据存储问题
- mybatis解决oracle数据库存储长字符串问题
- mybatis解决oracle数据库存储长字符串问题
- spring 3.2+mybatis 整合报错问题
- mybatis 校验报错问题[myeclipse 8.5]
- oracle null问题
- 解决 调PL/SQL存储过程报 trailing null missing from STR bind value 的问题
- Oracle数据库存储过程合并sql的时候报错问题
- Oracle Lob类型存储浅析( alter index lob索引 rebuild tablespace XX报错问题)
- ubuntu安装jdk
- 能一次进临界区的时候,不要多次进入
- myBatis 通过包含的jdbcType类型
- PHP和web页面交互(一)
- 通讯录操作问题--删除联系人不彻底
- mybatis存储null到oracle报错问题
- 查看错误
- Android 第五天(上午)
- iOS 错误提示
- java中任务调度java.util.Timer,ScheduledExecutor,Quartz的机制说明和demo代码实例分享
- Storyboard_Refactor
- Intent之七大属性总结
- 【NOIP2002】字串变换 -宽搜
- LaTeX技巧217:LaTeX如何生成随机文本