无法转换为java.lang.Throwable
阿神
阿神 2017-04-18 10:56:37
0
2
1165

java: 不兼容的类型: org.exolab.castor.xml.MarshalException无法转换为java.lang.Throwable

            try{
                marshaller.marshal(rpic);
            }catch (MarshalException e) {
                
            } catch (ValidationException e) {
               
            }

这两个异常都无法通过catch捕获,是这两个异常无法转化为java.lang.Throwable。

阿神
阿神

闭关修行中......

reply all(2)
洪涛

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!