读书人

hibernate有关问题

发布时间: 2012-01-09 21:05:42 作者: rapoo

救命啊,hibernate问题
用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


谁来拯救我吧,感激。。。!!!!

[解决办法]
高手们,救命啊!!

读书人网 >Java Web开发

热点推荐