org.dbunit.dataset.NoSuchColumnException:xxx.xxx

hibernate 配置文件

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="xxx">
	<class name="xxx" table="xxx">
		<id name="id" column="ID" type="integer">
			<generator class="native" />
		</id>
		<property name="xxx">
			<column name="xxx" sql-type="nvarchar(300)"></column>
		</property>
	</class>
</hibernate-mapping>

錯誤中:WARNING - CAMP_EADVICE_RCMMD.GOLD_RCMMD data type (-9, ënvarcharí) not recognized and will be ignored. See FAQ for more information. 

原因:dbunit不識別nvarchar類型。改爲varchar(300)就可以了。

 

你可能感兴趣的:(exception)