用JSF+SPRING+HIBERNATE做毕业设计,insert的时候报错,搞了三天也摆不平啊
19:09:54,875 INFO [STDOUT] 19:09:54,875 WARN [JDBCExceptionReporter] SQL Error: 1265, SQLState: 01000
19:09:54,875 INFO [STDOUT] 19:09:54,875 ERROR [JDBCExceptionReporter] Data truncated for column 'sex ' at row 1
19:09:54,906 INFO [STDOUT] 19:09:54,890 ERROR [AbstractFlushingEventListener] Could not synchronize database state with session
org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
at org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:92)。。。。。。。
[STDOUT] 19:09:54,937 ERROR [MethodBindingImpl] Exception while invoking expression #{customerBean.registerTeacherAction}
org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Could not execute JDBC batch update; uncategorized SQLException for SQL [insert into teacher (password, realname, identitynumber, sex, age, tel, locating, QQ, email, type, university, major, subject, freetime, experience, requiresalary, resume, precontracttimes, auditing, teacher_id, teachername) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; SQL state [01000]; error code [1265]; Data truncated for column 'sex ' at row 1; nested exception is java.sql.BatchUpdateException: Data truncated for column 'sex ' at row 1
java.sql.BatchUpdateException: Data truncated for column 'sex ' at row 1
谁来拯救我吧,感激。。。!!!!
------解决方案--------------------
高手们,救命啊!!