數(shù)據(jù)庫顯示亂碼,求老師幫忙
數(shù)據(jù)庫編碼utf8了,jsp的也設(shè)置utf-8,但是就是一直報(bào)下面這個(gè)錯(cuò)
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)