项目整理之一:

mac2022-06-30  64

问题描述:

严重: Servlet.service() for servlet jsp threw exceptioncom.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Unknown column 'docinfo0_.content_type' in 'field list'

解决方案:

这是因为在PO的映射文件里,column的名称与对应数据库表中的列名不一致造成的。

这里的错误是

<hibernate-mapping package="com.online.doc.domain"> <class name="DocInfo" table="doc_info" dynamic-update="true" lazy="true" >

      <property name="contentType" column="content" type="string" /> 

</class></hibernate-mapping>

 

转载于:https://www.cnblogs.com/Null2051/archive/2013/05/24/3097220.html

最新回复(0)