数据库显示乱码,求老师帮忙
数据库编码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)