Checkstyle "Unable to get class information for @throws tag 'xxxException" 问题
2009-03-18 14:48
766 查看
这两天, 在运行checkstyle检查代码的时候, 老是出现"Unable to get class information for @throws tag 'xxxException"
看了半天, 找不出原因, java类中的import都是正确的, 编译什么也都没有问题.
上网搜索了一下, 找到一篇讨论,
http://forums.topcoder.com/?module=Thread&threadID=508195&start=0
The cause is that the class ConfigurationException, which is mentioned in BasicPDFBuilder is not in the run classpath of Checkstyle, so checkstyle cannot perform any checks on whether it is a checked exception or a runtime exception or other. So this is not really a warning about your code being bad, but a warning about checkstyle being unable to fully check whether the import and usage of the class ConfigurationException conforms to the coding styles configured.
看了一下, 原来是因为编译好的类没有在checkstyle的classpath中.
所以, 只要将编译好的class配置到在<checkstyle/>的classpath中就没有这个问题了.
另外, 还发现checkstyle的line length好像也有点问题, 明明没有超过120个字符, 却还是报错.
无奈, 我把Eclipse中java > code style > formatter中的Maximum line with改成了100, 然后format一下, 基本就没有问题了.
看了半天, 找不出原因, java类中的import都是正确的, 编译什么也都没有问题.
上网搜索了一下, 找到一篇讨论,
http://forums.topcoder.com/?module=Thread&threadID=508195&start=0
The cause is that the class ConfigurationException, which is mentioned in BasicPDFBuilder is not in the run classpath of Checkstyle, so checkstyle cannot perform any checks on whether it is a checked exception or a runtime exception or other. So this is not really a warning about your code being bad, but a warning about checkstyle being unable to fully check whether the import and usage of the class ConfigurationException conforms to the coding styles configured.
看了一下, 原来是因为编译好的类没有在checkstyle的classpath中.
所以, 只要将编译好的class配置到在<checkstyle/>的classpath中就没有这个问题了.
另外, 还发现checkstyle的line length好像也有点问题, 明明没有超过120个字符, 却还是报错.
无奈, 我把Eclipse中java > code style > formatter中的Maximum line with改成了100, 然后format一下, 基本就没有问题了.
相关文章推荐
- Got an exception - java.lang.RuntimeException: Unable to get class information for @throws tag 'XXXException'.
- checkstyle问题:解决Got an exception - java.lang.RuntimeException: Unable to get class information for ***Exception
- "Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace"问题解决
- Swift教程_swift常见问题(0001)_CoreData: warning: Unable to load class named 'xxx' for entity 'xxx'
- Swift使用CoreData报错:CoreData: warning: Unable to load class named 'xxx' for entity 'xxx'.
- 使用ACE日志策略时遇到的问题:DLL::open failed for ACE: Error: check log for details Unable to find service 'Logger'
- 自定义标签遇到的问题unable to load tag handler class "XX" for tag "XX"
- 问题:org.apache.jasper.JasperException: Unable to compile class for JSP
- JasperException: /MyELTag.jsp(28,2) Unable to load tag handler class "com.icss.tag.MyTag" for tag ..
- fatal error: malformed or corrupted AST file: 'Unable to load module "/Users/xxx/Library/Developer/X
- 关于org.apache.jasper.JasperException: Unable to compile class for JSP问题的解决方案
- Unable to instantiate Action, xxxAction, defined for 'xxx' in namespace '/'xxxAction解决方式
- Parser exception for xx/AndroidManifest.xml: The reference to entity "z" must end with the ';' delim
- [Android] "Failed to find Java version for 'C:\Windows\system32\java.exe"问题的解决方法
- "Unable to get buffer of resource asset file"问题的解决
- Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key
- android生成apk包出现Unable to add "XXX" Zip add failed问题
- Unable to find a value for "dwmc" in object of class "java.lang.String" using operator "." (null
- 【物联网】OpenWrt编译出现Unable to find remote helper for 'https'问题
- Unable to cast COM object of type 'Word.ApplicationClass' to interface type 'Word._Application'"