insert插入错误
16:24:30,803 Fetching JDBC Connection from DataSource
16:24:30,826 Returning JDBC Connection to DataSource
16:24:30,838 Adding [systemProperties] PropertySource with lowest search precedence
16:24:30,839 Adding [systemEnvironment] PropertySource with lowest search precedence
16:24:30,839 Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
16:24:30,839 Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml]
16:24:30,841 Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl]
16:24:30,843 Found beans DTD [http://www.springframework.org/dtd/spring-beans-2.0.dtd] in classpath: spring-beans-2.0.dtd
16:24:30,856 Loading bean definitions
16:24:30,902 Creating shared instance of singleton bean 'DB2'
16:24:30,902 Creating instance of bean 'DB2'
16:24:30,902 Eagerly caching bean 'DB2' to allow for resolving potential circular references
16:24:30,911 Finished creating instance of bean 'DB2'
16:24:30,911 Creating shared instance of singleton bean 'Derby'
16:24:30,911 Creating instance of bean 'Derby'
16:24:30,911 Eagerly caching bean 'Derby' to allow for resolving potential circular references
16:24:30,912 Finished creating instance of bean 'Derby'
16:24:30,912 Creating shared instance of singleton bean 'H2'
16:24:30,912 Creating instance of bean 'H2'
16:24:30,912 Eagerly caching bean 'H2' to allow for resolving potential circular references
16:24:30,913 Finished creating instance of bean 'H2'
16:24:30,913 Creating shared instance of singleton bean 'HSQL'
16:24:30,913 Creating instance of bean 'HSQL'
16:24:30,913 Eagerly caching bean 'HSQL' to allow for resolving potential circular references
16:24:30,914 Finished creating instance of bean 'HSQL'
16:24:30,914 Creating shared instance of singleton bean 'Informix'
16:24:30,914 Creating instance of bean 'Informix'
16:24:30,914 Eagerly caching bean 'Informix' to allow for resolving potential circular references
16:24:30,914 Finished creating instance of bean 'Informix'
16:24:30,914 Creating shared instance of singleton bean 'MS-SQL'
16:24:30,914 Creating instance of bean 'MS-SQL'
16:24:30,914 Eagerly caching bean 'MS-SQL' to allow for resolving potential circular references
16:24:30,915 Finished creating instance of bean 'MS-SQL'
16:24:30,915 Creating shared instance of singleton bean 'MySQL'
16:24:30,915 Creating instance of bean 'MySQL'
16:24:30,915 Eagerly caching bean 'MySQL' to allow for resolving potential circular references
16:24:30,916 Finished creating instance of bean 'MySQL'
16:24:30,916 Creating shared instance of singleton bean 'Oracle'
16:24:30,916 Creating instance of bean 'Oracle'
16:24:30,917 Eagerly caching bean 'Oracle' to allow for resolving potential circular references
16:24:30,917 Finished creating instance of bean 'Oracle'
16:24:30,918 Creating shared instance of singleton bean 'PostgreSQL'
16:24:30,918 Creating instance of bean 'PostgreSQL'
16:24:30,918 Eagerly caching bean 'PostgreSQL' to allow for resolving potential circular references
16:24:30,919 Finished creating instance of bean 'PostgreSQL'
16:24:30,919 Creating shared instance of singleton bean 'Sybase'
16:24:30,919 Creating instance of bean 'Sybase'
16:24:30,919 Eagerly caching bean 'Sybase' to allow for resolving potential circular references
16:24:30,920 Finished creating instance of bean 'Sybase'
16:24:30,920 Creating shared instance of singleton bean 'Hana'
16:24:30,920 Creating instance of bean 'Hana'
16:24:30,920 Eagerly caching bean 'Hana' to allow for resolving potential circular references
16:24:30,921 Finished creating instance of bean 'Hana'
16:24:30,921 SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase, Hana]
16:24:30,921 Looking up default SQLErrorCodes for DataSource [org.apache.commons.dbcp.BasicDataSource@e98fb3e]
16:24:30,927 Fetching JDBC Connection from DataSource
16:24:30,928 Returning JDBC Connection to DataSource
16:24:30,928 Database product name cached for DataSource [org.apache.commons.dbcp.BasicDataSource@e98fb3e]: name is 'MySQL'
16:24:30,929 SQL error codes for 'MySQL' found
16:24:30,930 Translating SQLException with SQL state '42000', error code '1064', message [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 'where email= '815129029@qq.com'' at line 3]; SQL was [] for task [
### 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 'where email= '815129029@qq.com'' at line 3
### The error may involve com.smart.dao.CompanyDao.CompleteCom-Inline
### The error occurred while setting parameters
### SQL: insert into company(name,website,city,select_industry_hidden,select_scale_hidden,temptation,principal,phone) values(?,?,?,?,?,?,?,?) where email= ?
### 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 'where email= '815129029@qq.com'' at line 3
]
16:24:30,931 Resolving exception from handler [public java.util.Map<java.lang.String, java.lang.Object> com.smart.controller.CompanyController.Completecom(com.smart.bean.Company) throws java.io.IOException]: org.springframework.jdbc.BadSqlGrammarException:
### 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 'where email= '815129029@qq.com'' at line 3
### The error may involve com.smart.dao.CompanyDao.CompleteCom-Inline
### The error occurred while setting parameters
### SQL: insert into company(name,website,city,select_industry_hidden,select_scale_hidden,temptation,principal,phone) values(?,?,?,?,?,?,?,?) where email= ?
### 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 'where email= '815129029@qq.com'' at line 3
; bad SQL grammar []; nested exception is 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 'where email= '815129029@qq.com'' at line 3
16:24:30,946 Resolving exception from handler [public java.util.Map<java.lang.String, java.lang.Object> com.smart.controller.CompanyController.Completecom(com.smart.bean.Company) throws java.io.IOException]: org.springframework.jdbc.BadSqlGrammarException:
### 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 'where email= '815129029@qq.com'' at line 3
### The error may involve com.smart.dao.CompanyDao.CompleteCom-Inline
### The error occurred while setting parameters
### SQL: insert into company(name,website,city,select_industry_hidden,select_scale_hidden,temptation,principal,phone) values(?,?,?,?,?,?,?,?) where email= ?
### 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 'where email= '815129029@qq.com'' at line 3
; bad SQL grammar []; nested exception is 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 'where email= '815129029@qq.com'' at line 3
16:24:30,947 Resolving exception from handler [public java.util.Map<java.lang.String, java.lang.Object> com.smart.controller.CompanyController.Completecom(com.smart.bean.Company) throws java.io.IOException]: org.springframework.jdbc.BadSqlGrammarException:
### 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 'where email= '815129029@qq.com'' at line 3
### The error may involve com.smart.dao.CompanyDao.CompleteCom-Inline
### The error occurred while setting parameters
### SQL: insert into company(name,website,city,select_industry_hidden,select_scale_hidden,temptation,principal,phone) values(?,?,?,?,?,?,?,?) where email= ?
### 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 'where email= '815129029@qq.com'' at line 3
; bad SQL grammar []; nested exception is 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 'where email= '815129029@qq.com'' at line 3
16:24:30,948 Could not complete request
原来的我sql语句写错了
<insert id="CompleteCom" parameterType="Company">
insert into company(name,website,city,select_industry_hidden,select_scale_hidden,temptation,principal,phone)
values(#{name},#{website},#{city},#{select_industry_hidden},#{select_scale_hidden},#{temptation},#{principal},#{phone})
where email= #{email}
</insert>
insert不支持where的,应该用update
<update id="CompleteCom" parameterType="Company">
UPDATE company
<set>
name=#{name},
website=#{website},
city=#{city},
select_industry_hidden=#{select_industry_hidden},
select_scale_hidden=#{select_scale_hidden},
temptation=#{temptation},
principal=#{principal},
phone=#{phone}
</set>
WHERE email=#{email}
</update>
insert插入错误的更多相关文章
- Hibernate插入错误:GenericJDBCException: could not insert:
数据库中一般不能建立user(表名为User)表,将User类改名,又一次建立映射,问题就能够解决 当然,还有还有一种情况.就是类中id类型错误.要设置为Integer型才干够设置自己主动增长,否则也 ...
- mysql insert插入时实现如果数据表中主键重复则更新,没有重复则插入的四种方法
[CSDN下载] Powerdesigner 设计主键code不能重复等问题 [CSDN博客] Oracle中用一个序列给两个表创建主键自增功能的后果 [CSDN博客] MySQL自增主键删除后重复问 ...
- MySQL使用INSERT插入多条记录
MySQL使用INSERT插入多条记录,应该如何操作呢?下面就为您详细介绍MySQL使用INSERT插入多条记录的实现方法,供您参考. 看到这个标题也许大家会问,这有什么好说的,调用多次INSERT语 ...
- MySQL INSERT插入条件判断:如果不存在则插入
摘要: 我们经常需要进行sql的批量插入,要求:该条记录不存在则插入,存在则不插入.如果使用一条INSERT语句实现呢? 普通的 INSERT INTO 插入: INSERT INTO card(ca ...
- knockout-validation不自动插入错误消息
<div data-bind="validationOptions:{insertMessages:false}"> <div class="valid ...
- phalcon: update修改数据却变成了insert插入数据
phalcon: 在对表进行操作是,update修改数据却变成了insert插入数据. 发现,update的时,无论怎么加where都会变成了insert插入数据. 检查了一下表,原来是表没有 主键引 ...
- JAVA insert() 插入字符串 reverse() 颠倒 delete()和deleteCharAt() 删除字符 replace() 替换 substring() 截取子串
insert() 插入字符串 StringBuffer insert(int index,String str) StringBuffer insert(int index,char ch) Stri ...
- 转://使用insert插入大量数据的总结
使用insert插入大量数据的个人经验总结在很多时候,我们会需要对一个表进行插入大量的数据,并且希望在尽可能短的时间内完成该工作,这里,和大家分享下我平时在做大量数据insert的一些经验. 前提:在 ...
- Insert插入不同的列数量,统计信息对比
一.实验目的: Insert插入表中相同的行数量,不同的列数量,通过10046 和autotrace工具对比查看逻辑读.物理读.time数据,并得出相应结论 二.测试 2.1测试流程: =>[为 ...
随机推荐
- 这6种思维,学会了你就打败了95%文案!zz
本文笔者为大家讲述了文案高手写文案时最常用的六种思维,这六种思维也都是文案新手容易入的坑. 有的人做了3,5年的文案,还是小白一个.而有的人短短1,2年的时间,却可以成为文案高手. 为什么? 我总结 ...
- NYOJ 116 士兵杀敌(二)【线段树 单点更新】
题意:题意非常清楚: 策略:如题. 这道题就是简单的线段树应用,据说还能够用树状数组来做,等我学了之后在说吧. 代码: #include<stdio.h> #include<stri ...
- Linux命令之ln软链接
用途:链接文件 默认情况下,ln命令产生硬链接. 最常用的参数是-s(建立符号连接Symbolic Link,也叫软连接),具体用法是: ln-s 源文件 目标文件 当我们需要在不同的目录用到相同的文 ...
- Eclipse快捷键大全(转载)
一·eclipse 中的一些常用的快捷键Eclipse的编辑功能非常强大,掌握了Eclipse快捷键功能,能够大大提高开发效率.Eclipse中有如下一些和编辑相关的快捷键. 1. [ALT+/] ...
- 程序猿的量化交易之路(27)--Cointrader之PriceData价格数据(14)
转载须注明出处:http://blog.csdn.net/minimicall?viewmode=contents,http://cloudtrade.top/ PriceData:价格数据.价格数据 ...
- Erlang二进制模式匹配
Erlang的模式匹配用来处理二进制数据可谓是得心应手.不仅直观,而且超乎想象的简单.在C++中,处理二进制数据首先要管理缓冲区.然后再按字节进行操作,如果要处理的数据不是按字节对齐,则需要进行位移等 ...
- 基于EasyDarwin云视频平台的幼儿园视频直播(手机直播/微信直播)解决方案
一.方案介绍 1.1.方案背景 在2016年10月25日至28日的安博会上,我们看到了不少的幼教平台厂商,我们注意到大部分的幼教平台,为了追求极佳的用户体验,在微信或者APP端能够做到极快的打开速度, ...
- EasyDarwin开源社区 短视频拍摄项目Github地址
在前面的几篇博客中,我们提到了EasyDarwin开源团队整理出来的短视频拍摄技术要点,这次我们将短视频技术及SDK整理成一个完整的Github项目进行长期维护,同时会支持安卓Android和IOS版 ...
- Struts2中的OGNL表达式
一.OGNL表达式简介 OGNL是Object Graphic Navigation Language(对象图导航语言)的缩写,它是一个开源项目.所谓对象图,即以任意一个对象为根,通过OGNL可以访问 ...
- Splits a tensor into sub tensors
https://www.tensorflow.org/api_docs/python/tf/split # 'value' is a tensor with shape [5, 30] # Split ...