为了自动生成数据库数据。用了这个方法,产生的错误什么意思???谢谢!问题如下:Hibernate: insert into T_Module (name, sn, url, orderNo, parentId) values (?, ?, ?, ?, ?)
20:16:05,000  WARN JDBCExceptionReporter:71 - SQL Error: 1366, SQLState: HY000
20:16:05,000 ERROR JDBCExceptionReporter:72 - Incorrect string value: '\xB8\xF6\xC8\xCB\xB0\xEC...' for column 'name' at row 1
org.springframework.orm.hibernate3.HibernateJdbcException: JDBC exception on Hibernate data access; nested exception is org.hibernate.exception.GenericJDBCException: could not insert: [com.zhou.oa.model.Module]
Caused by: org.hibernate.exception.GenericJDBCException: could not insert: [com.zhou.oa.model.Module]
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)

解决方案 »

  1.   

    Incorrect string value: '\xB8\xF6\xC8\xCB\xB0\xEC...' for column 'name' at row 1好像是数据表的列名字有错
      

  2.   

    补充:
    1:06:50,281  WARN FromElementType:349 - Using non-qualified column reference [processInstance -> ([PROCESSINSTANCE_])]
    21:06:50,390  WARN FromElementType:349 - Using non-qualified column reference [isSuspended -> ([ISSUSPENDED_])]
    21:06:50,390  WARN FromElementType:349 - Using non-qualified column reference [token -> ([TOKEN_])]
    21:06:50,546  WARN FromElementType:349 - Using non-qualified column reference [id -> ([ID_])]
    21:06:50,609  WARN FromElementType:349 - Using non-qualified column reference [processInstance -> ([PROCESSINSTANCE_])]
    21:06:51,093  WARN FromElementType:349 - Using non-qualified column reference [isSuspended -> ([ISSUSPENDED_])]
    21:06:51,093  WARN FromElementType:349 - Using non-qualified column reference [token -> ([TOKEN_])]
    21:06:51,234  WARN FromElementType:349 - Using non-qualified column reference [processInstance -> ([PROCESSINSTANCE_])]
      

  3.   

    hibernate 和数据库的 name 字段 你检查一下
     insert into T_Module (name, sn, url, orderNo, parentId) values (?, ?, ?, ?, ?) 
    的时候你要插入name字段的值有问题
      

  4.   

    把数据库改成了gbk格式就行了