java: 不兼容的類型: org.exolab.castor.xml.MarshalException無法轉換為java.lang.Throwable
try{
marshaller.marshal(rpic);
}catch (MarshalException e) {
} catch (ValidationException e) {
}
這兩個異常都無法通過catch捕獲,是這兩個異常無法轉化為java.lang.Throwable。
閉關修行中......
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
The castor-core-1.3.3.jar that this jar depends on is not fully downloaded in the local maven repository.