MyException - 我的异常网
当前位置:我的异常网» J2SE » Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSynt

Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:

www.MyException.Cn  网友分享于:2013-11-27  浏览:6986次
sql错误,信息我没看懂,高手请进
com.mysql.jdbc.JDBC4Connection@66b1f4] bound to thread [http-8080-1]
{pstm-100499} Executing Statement: insert into user(COMPANYID, USERNUMBER, NAME, GENDER, NATION, BIRTHDAY, CARDNUMBER, DIPLOMA, ADDRESS, TEL, MARRY, JOBDATE, DEPT, JOB, REMARK, PIC, FLG, STATE) values(?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?,?,?)  
{pstm-100499} Parameters: [10, 123, 123, 0, 123, 2011-09-29, 123, 3, 123, 123, 0, 2011-10-10, 112, 123, 3123, 20111017154245109.jpg, 3, 0]
{pstm-100499} Types: [java.lang.Integer, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String]
StandardXAPreparedStatement:close the XA prepared statement
StandardXAPreparedStatement:close preparedStmtCacheSize='16'
SQLErrorCodes loaded: [HSQL, PostgreSQL, MySQL, Oracle, Sybase, DB2, Informix, MS-SQL]
Looking up default SQLErrorCodes for DataSource [org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy@1c319b9]
Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@342c15] for key [org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy@1c319b9] bound to thread [http-8080-1]
Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@342c15] for key [org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy@1c319b9] bound to thread [http-8080-1]
Database product name cached for DataSource [org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy@1c319b9]: name is 'MySQL'
SQL error codes for 'MySQL' found
Translating SQLException with SQL state '42S22', error code '1054', message [  
--- The error occurred in com/comm/dao/sqlmap/User.xml.  
--- The error occurred while applying a parameter map.  
--- Check the addUser-InlineParameterMap.  
--- Check the statement (update failed).  
--- Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'FLG' in 'field list']; SQL was [] for task [SqlMapClient operation]
Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@342c15] for key [org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy@1c319b9] bound to thread [http-8080-1]
TimerEvent.new(bb14:38:0:0160590740e057d45f...51e013:.process
TransactionImpl.timeoutExpired
make subcoordinator
tx=bb14:38:0:0160590740e057d45f...51e013:, xid=bb14:38:0:0160590740e057d45f...51e013:
set rollback only (tx=bb14:38:0:0160590740e057d45f...51e013:)
status=STATUS_ACTIVE


------解决方案--------------------
查看你的表结构 有没有 column 'FLG'
------解决方案--------------------
Unknown column 'FLG' in 'field list'

应该是没有FLG这个列名
------解决方案--------------------
[color=#FF0000][/color]请LZ好好检查你的数据库FLG字段根本没有,要么就是字段名称写错了。。
查看一下你的ibatis的配置文件:The error occurred in com/comm/dao/sqlmap/User.xml.中属性和数据库字段对应时名称是否正确。

Database product name cached for DataSource [org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy@1c319b9]: name is 'MySQL'
SQL error codes for 'MySQL' found
这句话表明你的xml配置数据源时还有问题,,mysql数据库是否配置正确。由于你没有贴出你连数据库的参数配置。。这里无法判断。。。

文章评论

软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有