Hibernate 异常:
Invocation of init method failed; nested exception is org.hibernate.MappingException: Association references unmapped class
错误: 所有有跟这张表有关联的 .hbm.xml 的CLASS路径是否正确.
解决的方法:看各个包中的映射文件中的内容,如
<many-to-one name="district" class="db.basic.register.District" fetch="select">
<column name="districtid" length="6" not-null="true" />
</many-to-one>
<many-to-one name="users" class="db.basic.register.Users" fetch="select">
<column name="usersid" not-null="true" />
中的class 后面的路径是不是对,如果不对改过来即可