如何修复'不能异常类型SomeException可以抛出;一个异常类型必须是Throwable的子类' [英] How can I fix 'No exception of type SomeException can be thrown; an exception type must be a subclass of Throwable'

查看:1874
本文介绍了如何修复'不能异常类型SomeException可以抛出;一个异常类型必须是Throwable的子类'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有java webstart应用程序,并希望使用app API进行测试。
所以我从Web服务器获得所需(如我所假设的)库,并将其安装到maven存储库。
除了收到


,除了自定义异常以外,一切都是正常的类型 SomeException 可以抛出;一个例外类型必须是 Throwable的子类


正如我从类似的主题 - 一些jar库丢失,有没有办法知道哪一个?或者也许还有其他方法来解决这个问题? (当然我可以安装用于应用程序的所有jar,但是有超过90个jar)。

解决方案

我使用JadClipse Eclipse插件,用于反编译我的jar,并发现我的 SomeException扩展了FaultInfoException (org.codehaus.xfire.fault.FaultInfoException),而不仅仅是添加xfire-all依赖于我的pom。 xml


I have java webstart app and want to use app API for testing purposes. So I get required (as I assumed) library from webserver and install it to maven repository. And all is fine except custom exception which received

No exception of type SomeException can be thrown; an exception type must be a subclass of Throwable

As I understand from similar topics - some jar library is missing, is there some way to know which one? or maybe there is other way to fix this? (of course I can install all jars which used for app, but there are over 90 jar's).

解决方案

I use JadClipse Eclipse plug-in for decompiling my jar and find that my SomeException extends FaultInfoException (org.codehaus.xfire.fault.FaultInfoException), than simply add xfire-all dependecy to my pom.xml

这篇关于如何修复'不能异常类型SomeException可以抛出;一个异常类型必须是Throwable的子类'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆