Got an exception - java.lang.RuntimeException: Unable to get class information for @throws tag 'XXXException'.
来源:互联网 发布:手机淘宝5.6.0.版本 编辑:程序博客网 时间:2024/05/28 16:14
This message can be quite confusing. The cause of this message cannot be easily guessed from the error message CheckStyle gives.
Thecause is that the class ConfigurationException, which is mentioned inBasicPDFBuilder is not in the run classpath of Checkstyle, socheckstyle cannot perform any checks on whether it is a checkedexception or a runtime exception or other. So this is not really awarning about your code being bad, but a warning about checkstyle beingunable to fully check whether the import and usage of the classConfigurationException conforms to the coding styles configured.
Soyou need to modify the ant scriptlet which runs your checkstyle (-whenrunning checkstyle locally, during automatic screening there's nothingyou can do about it..) to include all libraries in the run classpath:
<taskdef resource="checkstyletask.properties"/>
<target name="checkstyle" depends="compile">
<mkdir dir="${testlogdir}"/>
<checkstyle failonviolation="false" config="../tc_checks.xml">
<classpath>
<path refid="buildlibs"/>
<pathelement location="${build_classdir}"/>
</classpath>
<fileset dir="${javamain}" includes="**/*.java"/>
<formatter type="plain" toFile="${testlogdir}/checkstyle.txt"/>
</checkstyle>
</target>
<target name="checkstyle_tests" depends="compile_tests">
<mkdir dir="${testlogdir}"/>
<checkstyle failonviolation="false" config="../tc_test_checks.xml" >
<classpath>
<path refid="buildlibs"/>
<pathelement location="${javatests}"/>
</classpath>
<fileset dir="${javatests}/${packagedir}/" includes="**/*.java"
excludes="UnitTests.java, AllTests.java, stresstests/*, failuretests/*, accuracytests/*"/>
<formatter type="plain" toFile="${testlogdir}/checkstyletest.txt"/>
</checkstyle>
</target>
Note: the files tc_checks.xml and tc_test_checks.xml can be obtained here: http://www.topcoder.com/tc?module=Static&d1=dev&d2=support&d3=compDocumentation
Forthis message to not occur during automatic screening some admin needsto fix this thing on the TC server, but as this classpath iscomponent-dependant (each component uses different libraries) and Iassume that the checks performed during automatic screening use onegeneric script for all submissons of all components, this would be abigger change on the TC automatic screening implementation (even morecomplicated: if the submitter added some 3rd-party libraries, that werenot part of CS in its submission).
So in general add the code mentioned above in your local build.xml (ivern,perhaps you could add this to the dev dist jars as a convenience...)and add checkstyle to your ant classpath, then check locally and fixthe things you want. Afterwards you dont't need to look at thecheckstyle results during automatic screening(as they should beidentical to the local check results ) and instead only need to checkthe results of the other automatic-screening-modules (like your namefound in your submission).
- 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
- Checkstyle "Unable to get class information for @throws tag 'xxxException" 问题
- java.lang.RuntimeException: Unable to instantiate activ
- java.lang.RuntimeException: Unable to instantiate activity
- “ java.lang.RuntimeException: Unable to instantiate application ”
- java.lang.RuntimeException: Unable to destroy activity
- java.lang.RuntimeException: Unable to instantiate application
- java.lang.RuntimeException: Unable to destroy activity
- java.lang.RuntimeException: Unable to instantiate application
- java.lang.RuntimeException: Unable to get provider android.support.v4.content.FileProvider
- ShellBasedUnixGroupsMapping: got exception trying to get groups for user webuser
- android进行单元测试时出现java.lang.RuntimeException: Unable to resolve activity for: Intent ……
- Caused by: java.lang.RuntimeException: Unable to bind views for xxActivity
- java.lang.RuntimeException: Unable to instantiate activity ComponentInfo
- java.lang.RuntimeException: Unable to start activity ComponentInfo
- AndroidRuntime(21900): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo
- java.lang.RuntimeException: Unable to instantiate activity ComponentInfo异常解决
- jxl 写 excel
- 中国电子商务的发展趋势
- SVN 清除SVN相关文件及文件夹
- C++的四种类型转换
- apache与iis的优劣对比
- Got an exception - java.lang.RuntimeException: Unable to get class information for @throws tag 'XXXException'.
- vb.net InputBox用法
- Android文档(二)-应用基础(1)应用组件(Application Components)
- SOA需要ESB吗?
- How the Kernel compile .c files for Kernel Module
- winform 刷新父窗体
- Apache+Tomcat集群和负载均衡安装配置笔记
- windows日志
- 位图缩放