出现此错误的原因
1、在hibernate 映射文件中引入了不存在的类名(例如com.cn.common.domain.UserRole),并且存在不必要的映射文件。
例如 <set
name="user"
inverse="true"
>
<key>
<column name="role_id" />
</key>
<one-to-many class="com.cn.common.domain.UserRole" />
</set>
具体详情如下
INFO: Illegal access: this web application instance has been
stopped already. Could not load org.apache.xerces.util.EncodingMap.
The eventual following stack trace is caused by an error thrown for
debugging purposes as well as to attempt to terminate the thread which
caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
2、因为hibernate 映射文件路径不对,映射文件应该放置在src目录下。
本文探讨了Hibernate映射文件中常见的两类错误:一是引入了不存在的类名,二是映射文件放置位置不正确。通过具体实例解析了错误产生的原因,并给出了相应的解决办法。
2285

被折叠的 条评论
为什么被折叠?



