java: 不兼容的类型: org.exolab.castor.xml.MarshalException无法转换为java.lang.Throwable
try{
marshaller.marshal(rpic);
}catch (MarshalException e) {
} catch (ValidationException e) {
}
这两个异常都无法通过catch捕获,是这两个异常无法转化为java.lang.Throwable。
PHP中文网2017-04-18 10:58:37
Look at the source code of this class. How can it be called Exception if it is not inherited from Throwable?
Additional:
I tried it specially and there is no problem. It is recommended to check the code and configuration
伊谢尔伦2017-04-18 10:58:37
The castor-core-1.3.3.jar that this jar depends on is not fully downloaded in the local maven repository.