New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ClassNotFoundException when using inherited exception #1192
Comments
all functionality base on loading class from classpath is deprecated now (due to a lot of bugs and no reliable way to do that for now) please try to use option Let me know if that does not help. |
I think you mean to set |
thanks, if you already see how to fix that please be welcome with PR. |
I think it should be sufficient to catch the NoClassDefFoundError in either the isLoadable method of ClassResolver or the resolveClass method of AbstractTypeAwareCheck. |
That is classpath managmend that checkstyle-maven-plugin provide. Please report additional issue to that project. |
@Vladlis , please help us with that issue. |
very strange issue as due to javadoc - only ClassNotFoundException is expected as we use "Class.forName". We can not create a test for that as we receive only ClassNotFoundException, so we will do blind extending of code to catch NoClassDefFoundError. |
merged. |
I also added some unchecked exceptions to a couple methods' throws declarations to work around Checkstyle bug 1192[1]. [1] checkstyle/checkstyle#1192
JavadocMethodCheck is used.
I have a custom exception class which extends NestableRuntimeException from commons-lang 2.6:
public class ApplicationException extends NestableRuntimeException { ... }
The custom exception and the code calling it are in my own jar file, while the NestableRuntimeException is in a Maven dependency. When I run checkstyle via maven-checkstyle-plugin, this always results in a stacktrace:
The same happens with checkstyle 6.7.
A similar issue was posted here: https://groups.google.com/forum/#!topic/checkstyle/9Yae7DL1kdo
The text was updated successfully, but these errors were encountered: