qq_敢心包_03378049
2016-10-24 11:15
数据库编码utf8了,jsp的也设置utf-8,但是就是一直报下面这个错
ERROR - Data truncation: Data too long for column 'pname' at row 1
ERROR - Exception occurred during processing request: could not insert: [cn.test.ssh.domain.Product]; SQL [insert into product (pname, price) values (?, ?)]; nested exception is org.hibernate.exception.DataException: could not insert: [cn.test.ssh.domain.Product]
org.springframework.dao.DataIntegrityViolationException: could not insert: [cn.test.ssh.domain.Product]; SQL [insert into product (pname, price) values (?, ?)]; nested exception is org.hibernate.exception.DataException: could not insert: [cn.test.ssh.domain.Product]
at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:648)
at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:412)
at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:375)
at org.springframework.orm.hibernate3.HibernateTemplate.save(HibernateTemplate.java:684)
at cn.test.ssh.dao.ProductDao.save(ProductDao.java:16)
还没有人回答问题,可以看看其他问题
基于SSH实现员工管理系统之框架整合篇
49831 学习 · 344 问题
相似问题