数据库嵌套异常
来源:互联网 发布:淘宝如何设置促销价 编辑:程序博客网 时间:2024/06/07 23:30
错误信息为:
### Cause: java.sql.SQLException: Incorrect integer value: 'thy' for column 'userid' at row 1
; uncategorized SQLException for SQL []; SQL state [HY000]; error code [1366]; Incorrect integer value: 'thy' for column 'userid' at row 1; nested exception is java.sql.SQLException: Incorrect integer value: 'thy' for column 'userid' at row 1] with root causejava.sql.SQLException: Incorrect integer value: 'thy' for column 'userid' at row 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1056)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3376)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3308)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1837)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1961)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2543)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1737)
at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:998)
at com.jolbox.bonecp.PreparedStatementHandle.execute(PreparedStatementHandle.java:140)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59)
at com.sun.proxy.$Proxy25.execute(Unknown Source)
at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:45)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:73)
at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:49)
at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:115)
at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:75)
at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:170)
at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:386)
at com.sun.proxy.$Proxy11.insert(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:253)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:52)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:53)
at com.sun.proxy.$Proxy23.addUser(Unknown Source)
该错误为:
页面表单数据与后台SQL语句中列名个数不一致导致的,把后台SQL语句的列名个数改为和表单一致即可解决问题。
阅读全文
0 0
- 数据库嵌套异常
- 异常链,异常嵌套
- 异常捕获嵌套
- C++ 嵌套异常
- xml格式异常-CDATA嵌套
- xml格式异常-CDATA嵌套
- xml格式异常-CDATA嵌套
- 数据库 嵌套查询
- 数据库事务嵌套
- 数据库中嵌套表
- SQL数据库嵌套查询
- 数据库异常
- 数据库异常
- 数据库异常
- 数据库异常
- 数据库not exists 嵌套查询
- 关于数据库事务的嵌套
- 通过嵌套逐条遍历数据库
- nodejs带Cookie的POST操作
- 【Redis】RedisCluster 批量删除key
- 2.21 性能优化
- C语言笔记——结构体的使用
- ImageLoader的使用
- 数据库嵌套异常
- python命令行plt中imshow无法显示图片的问题
- 对称多处理(SMP)
- KMP算法
- WodongComponent_发短信
- Data source rejected establishment of connection, message from server: "Too many connections"
- Curl安装(Linux)
- 前后台传换行符的问题
- 88. Merge Sorted Array