org.springframework.scheduling.quartz.SchedulerFactoryBean
.run(SchedulerFactoryBean.java:668) 2012-07-13 13:21:08.780 -- INFO -- Starting Quartz Scheduler now, after delay of 20 seconds org.springframework.scheduling.quartz.Scheduler
org.springframework.scheduling.quartz.SchedulerFactoryBean$1.run(SchedulerFactoryBean.java:668) 2012-07-13 13:21:08.780 -- INFO -- Starting Quartz Scheduler now, after delay of 20 seconds
org.quartz.core.QuartzScheduler.start(QuartzScheduler.java:500) 2012-07-13 13:21:08.781 -- INFO -- Scheduler schedulerFactory_$_NON_CLUSTERED started.
com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getPoolManager(AbstractPoolBackedDataSource.java:462) 2012-07-13 13:38:26.675 -- INFO -- Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 5, acquireRetryAttempts -> 3, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> t_connect_table_test, breakAfterAcquireFailure -> false, checkoutTimeout -> 30000, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1hge15x8oz6e3qy1us2q8d|14596d5, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.mysql.jdbc.Driver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1hge15x8oz6e3qy1us2q8d|14596d5, idleConnectionTestPeriod -> 18000, initialPoolSize -> 5, jdbcUrl -> jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=UTF-8, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 25000, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 200, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 5, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> null, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> true, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]
org.apache.ibatis.logging.slf4j.Slf4jImpl.debug(Slf4jImpl.java:28) 2012-07-13 13:38:26.706 -- DEBUG -- ooo Connection Opened
org.apache.ibatis.logging.slf4j.Slf4jImpl.debug(Slf4jImpl.java:28) 2012-07-13 13:38:26.801 -- DEBUG -- ==> Executing: INSERT INTO user (nickName,pwd,tianyiPhone) VALUES (?,?,?)
org.apache.ibatis.logging.slf4j.Slf4jImpl.debug(Slf4jImpl.java:28) 2012-07-13 13:38:26.801 -- DEBUG -- ==> Parameters: dd(String), dd(String), ddddd(String)
org.springframework.jdbc.support.SQLErrorCodesFactory.<init>(SQLErrorCodesFactory.java:126) 2012-07-13 13:38:26.863 -- INFO -- SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase]
2012-7-13 13:38:26 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet [servetAction] in context with path [/3g] threw exception [Request processing failed; nested exception is org.springframework.jdbc.BadSqlGrammarException:
### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'nickName' in 'field list'
### The error may involve com.plaminfo.group.entity.User.insert-Inline
### The error occurred while setting parameters
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'nickName' in 'field list'
; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'nickName' in 'field list'] with root cause
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'nickName' in 'field list'
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
org.quartz.core.QuartzScheduler.start(QuartzScheduler.java:500) 2012-07-13 13:21:08.781 -- INFO -- Scheduler schedulerFactory_$_NON_CLUSTERED started.
com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getPoolManager(AbstractPoolBackedDataSource.java:462) 2012-07-13 13:38:26.675 -- INFO -- Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 5, acquireRetryAttempts -> 3, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> t_connect_table_test, breakAfterAcquireFailure -> false, checkoutTimeout -> 30000, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1hge15x8oz6e3qy1us2q8d|14596d5, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.mysql.jdbc.Driver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1hge15x8oz6e3qy1us2q8d|14596d5, idleConnectionTestPeriod -> 18000, initialPoolSize -> 5, jdbcUrl -> jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=UTF-8, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 25000, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 200, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 5, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> null, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> true, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]
org.apache.ibatis.logging.slf4j.Slf4jImpl.debug(Slf4jImpl.java:28) 2012-07-13 13:38:26.706 -- DEBUG -- ooo Connection Opened
org.apache.ibatis.logging.slf4j.Slf4jImpl.debug(Slf4jImpl.java:28) 2012-07-13 13:38:26.801 -- DEBUG -- ==> Executing: INSERT INTO user (nickName,pwd,tianyiPhone) VALUES (?,?,?)
org.apache.ibatis.logging.slf4j.Slf4jImpl.debug(Slf4jImpl.java:28) 2012-07-13 13:38:26.801 -- DEBUG -- ==> Parameters: dd(String), dd(String), ddddd(String)
org.springframework.jdbc.support.SQLErrorCodesFactory.<init>(SQLErrorCodesFactory.java:126) 2012-07-13 13:38:26.863 -- INFO -- SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase]
2012-7-13 13:38:26 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet [servetAction] in context with path [/3g] threw exception [Request processing failed; nested exception is org.springframework.jdbc.BadSqlGrammarException:
### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'nickName' in 'field list'
### The error may involve com.plaminfo.group.entity.User.insert-Inline
### The error occurred while setting parameters
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'nickName' in 'field list'
; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'nickName' in 'field list'] with root cause
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'nickName' in 'field list'
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
7 个解决方案
#1
不是说得很清楚,字段名不对嘛。。。
#2
数据库表
CREATE TABLE `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nickName` varchar(64) NOT NULL,
`pwd` varchar(64) NOT NULL,
`tianyiPhone` varchar(18) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1
CREATE TABLE `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nickName` varchar(64) NOT NULL,
`pwd` varchar(64) NOT NULL,
`tianyiPhone` varchar(18) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1
#3
### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'nickName' in 'field list'
Executing: INSERT INTO user (nickName,pwd,tianyiPhone) VALUES (?,?,?)
有这个nickName 字段吗 ?
Executing: INSERT INTO user (nickName,pwd,tianyiPhone) VALUES (?,?,?)
有这个nickName 字段吗 ?
#4
是不是你user对象没 nickName这个属性,或者ibatis元数据配置出了问题
#5
package com.plaminfo.group.entity;
public class User extends IdEntity {
private String nickName;
private String pwd;
private String tianyiPhone;
public String getNickName() {
return nickName;
}
public void setNickName(String nickName) {
this.nickName = nickName;
}
public String getPwd() {
return pwd;
}
public void setPwd(String pwd) {
this.pwd = pwd;
}
public String getTianyiPhone() {
return tianyiPhone;
}
public void setTianyiPhone(String tianyiPhone) {
this.tianyiPhone = tianyiPhone;
}
}
public class User extends IdEntity {
private String nickName;
private String pwd;
private String tianyiPhone;
public String getNickName() {
return nickName;
}
public void setNickName(String nickName) {
this.nickName = nickName;
}
public String getPwd() {
return pwd;
}
public void setPwd(String pwd) {
this.pwd = pwd;
}
public String getTianyiPhone() {
return tianyiPhone;
}
public void setTianyiPhone(String tianyiPhone) {
this.tianyiPhone = tianyiPhone;
}
}
#6
https://lixiaorong223.blog.163.com/blog/static/4401162920114242157107/
希望有帮助
希望有帮助
#7
数据库链接对了么?
.run(SchedulerFactoryBean.java:668) 2012-07-13 13:21:08.780 -- INFO -- Starting Quartz Scheduler now, after delay of 20 seconds org.springframework.scheduling.quartz.Scheduler