Error updating database:线程异常

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" org.apache.ibatis.exceptions.PersistenceException:
### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '})' at line 1
### The error may involve com.qf.pojo.YtuserMapper.addUser-Inline
### The error occurred while setting parameters
### SQL: insert into ytuser(username,password) values(?,{password})
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '})' at line 1
有道翻译:
SLF4J:未能加载类“org.slf4j.impl.StaticLoggerBinder”。
SLF4J:看http://www.slf4j.org/codes.html StaticLoggerBinder为进一步的细节。
异常的线程“主要”org.apache.ibatis.exceptions.PersistenceException:
# # #错误更新数据库。原因:com.mysql.jdbc.exceptions.jdbc4。MySQLSyntaxErrorException:你有一个错误在您的SQL语法;检查与MySQL服务器版本对应的手册,以便正确语法使用“}”在第1行
# # #错误可能涉及com.qf.pojo.YtuserMapper.addUser-Inline
设置参数时发生错误
## SQL:插入ytuser(用户名,密码)值(?,{password})
# # #原因:com.mysql.jdbc.exceptions.jdbc4。MySQLSyntaxErrorException:你有一个错误在您的SQL语法;检查与MySQL服务器版本对应的手册,以便正确语法使用“}”在第1行
解决方法:
整个错误提示都是围绕SQL,所以重点检查一下SQL中一些配置
重点看:### SQL: insert into ytuser(username,password) values(?,{password}) 这一句

加上#

运行成功。
Error updating database:线程异常的更多相关文章
- Error updating database. Cause: java.sql.BatchUpdateException: Field 'id' doesn't have a default value
异常信息 ### Error updating database. Cause: java.sql.BatchUpdateException: Field 'id' doesn't have a de ...
- Error updating database. Cause: java.sql.SQLException: Access denied for user '${username}'@'localhost' (using password: YES)
导入别人的项目,出现一个错误,经过排查,是db.properties配置文件中的用户名与Mybatis-conf.xml配置文件中调用的用户名不一致所导致的 (db.properties中用的是nam ...
- SSM Mybatis将新增数据写入数据库时出现的500状态码:Error updating database.的可能
关于maven下ssm整合的项目推荐这篇博客:https://www.cnblogs.com/yiye/p/5969157.html 今日在ssm下的将新增数据写回数据库时遇到不少的问题,现作记录 如 ...
- Error updating database. Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value: 'as3'
执行更新时的出错信息 Whitelabel Error Page This application has no explicit mapping for /error, so you are see ...
- ### Error updating database. Cause: com.microsoft.sqlserver.jdbc.SQLServerException: 必须声明标量变量 "@P23@P24"。(sql少一个逗号)【??】
(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,[??],?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?, ...
- Error updating database. Cause: java.lang.IllegalArgumentException: invalid comparison: java.util.Date and java.lang.String异常处理
问题原因:Mybatis中对于时间参数进行比较时的一个BUG. 如果拿传入的时间类型参数与空字符串‘‘进行对比判断则会引发异常.,所以应该去掉该判断, 只保留非空判断就正常了 <if test= ...
- mybatis报Error updating database. Cause: java.lang.IllegalArgumentException: invalid comparison: java.util.Date and java.lang.String
mybatis 3.3.0中对于时间参数进行比较时的一个bug. 如果拿传入的时间类型参数与空字符串''进行对比判断则会引发异常. 所以在上面的代码中去该该判断, 只保留非空判断就正常了 <if ...
- 【问题解决:Mysql操作容量限制问题】Error updating database. Cause: com.mysql.jdbc.PacketTooBigException: Packet for query is too large (1082 > 1024)
在做查询数据库操作时,报了以上错误,还有out of memery heap hacp ,原因是mysql的max_allowed_packet设置过小引起的,我一开始设置的是1M,后来改为了20M ...
- 使用Mybatis连接数据库时报错:org.apache.ibatis.exceptions.PersistenceException: ### Error updating database.
我的原因是字段名写错了,去数据库中复制字段名再运行就成功了.
随机推荐
- python2.7安装mysql-python
环境:python2.7.14+mysql-python-1.2.3.win-amd64-py2.7.exe 安装版本许参照解释器版本,有64和32位之分,如果安装错误版本,则运行时会报错:Impor ...
- go实例—函数或方法的可变长参数
支持可变长参数列表的函数可以支持任意个传入参数,比如fmt.Println函数就是一个支持可变长参数列表的函数. 需要注意的是,可变长参数应该是函数定义的最右边的参数,即最后一个参数 package ...
- eclipse maven Errors while generating javadoc on java8
With JDK 8, we are unable to get Javadoc unless your tool meets the standards of doclint. Some of it ...
- Linux 系统下安装 python-skimage
Linux 系统下安装 python-skimage 安装必须的依赖 // python-mumpy // python-scipy // python-matplotlib $ sudo apt-g ...
- oracle常用SQL——创建用户、表空间、授权(12C)
一.查询 查询用户所属 表空间 select username,default_tablespace from dba_users where username='xxx' 查询表空间情况 SELEC ...
- 模拟实现ATM+购物商城程序
流程图: 需求: ATM:模拟实现一个ATM + 购物商城程序额度 15000或自定义实现购物商城,买东西加入 购物车,调用信用卡接口结账可以提现,手续费5%支持多账户登录支持账户间转账记录每月日常消 ...
- [c/c++] programming之路(8)、汇编、求模、自增自减
一.插入汇编 #include<stdio.h> void main(){ ; num=num+; //插入汇编语言 _asm{ mov eax,num;//eax是一个存储器,将num的 ...
- PHP html mysql js 乱码问题,UTF-8(乱码)
一.HTML页面转UTF-8编码问题 1.在head后,title前加入一行: <meta http-equiv='Content-Type' content='text/html; chars ...
- Codeforces 581F Zublicanes and Mumocrates - 树形动态规划
It's election time in Berland. The favorites are of course parties of zublicanes and mumocrates. The ...
- C#趋势图(highcharts插件)
<!--图表效果展现--> <div class="TUI-layout-center" style="overflow: auto;" id ...