Skip to content
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

plugin not compatible with Eclipse Checkstyle Plug-in version 8.0.0 #16

Closed
ahaack opened this issue Aug 11, 2017 · 2 comments
Closed

plugin not compatible with Eclipse Checkstyle Plug-in version 8.0.0 #16

ahaack opened this issue Aug 11, 2017 · 2 comments
Assignees

Comments

@ahaack
Copy link

ahaack commented Aug 11, 2017

After upgrading my eclipse checkstyle plugin to version 8.0.0 (https://sourceforge.net/projects/eclipse-cs/) I wasn't able to use checkstyle at all. It gave me following exception:

Checkstyle-Plugin: cannot initialize module TreeWalker - Unable to instantiate 'Jsr305Annotations'. class, it is also not possible to instantiate it as com.puppycrawl.tools.checkstyle.checks.annotationJsr305Annotations, com.puppycrawl.tools.checkstyle.checks.blocksJsr305Annotations, com.puppycrawl.tools.checkstyle.checks.codingJsr305Annotations, com.puppycrawl.tools.checkstyle.checks.designJsr305Annotations, com.puppycrawl.tools.checkstyle.checks.headerJsr305Annotations, com.puppycrawl.tools.checkstyle.checks.importsJsr305Annotations, com.puppycrawl.tools.checkstyle.checks.indentationJsr305Annotations, com.puppycrawl.tools.checkstyle.checks.javadocJsr305Annotations, com.puppycrawl.tools.checkstyle.checks.metricsJsr305Annotations, com.puppycrawl.tools.checkstyle.checks.modifierJsr305Annotations, com.puppycrawl.tools.checkstyle.checks.namingJsr305Annotations, com.puppycrawl.tools.checkstyle.checks.regexpJsr305Annotations, com.puppycrawl.tools.checkstyle.checks.sizesJsr305Annotations, com.puppycrawl.tools.checkstyle.checks.whitespaceJsr305Annotations, com.puppycrawl.tools.checkstyle.checksJsr305Annotations, com.puppycrawl.tools.checkstyle.filefiltersJsr305Annotations, com.puppycrawl.tools.checkstyle.filtersJsr305Annotations, com.puppycrawl.tools.checkstyleJsr305Annotations, com.github.sevntu.checkstyle.checks.annotationJsr305Annotations, com.github.sevntu.checkstyle.checks.codingJsr305Annotations, com.github.sevntu.checkstyle.checks.designJsr305Annotations, com.github.sevntu.checkstyle.checks.namingJsr305Annotations, com.github.sevntu.checkstyle.checks.sizesJsr305Annotations, com.github.sevntu.checkstyle.checksJsr305Annotations, com.github.sevntu.checkstyleJsr305Annotations, de.bjrke.checkstyle.jsr305.Jsr305Annotations, Jsr305AnnotationsCheck, com.puppycrawl.tools.checkstyle.checks.annotationJsr305AnnotationsCheck, com.puppycrawl.tools.checkstyle.checks.blocksJsr305AnnotationsCheck, com.puppycrawl.tools.checkstyle.checks.codingJsr305AnnotationsCheck, com.puppycrawl.tools.checkstyle.checks.designJsr305AnnotationsCheck, com.puppycrawl.tools.checkstyle.checks.headerJsr305AnnotationsCheck, com.puppycrawl.tools.checkstyle.checks.importsJsr305AnnotationsCheck, com.puppycrawl.tools.checkstyle.checks.indentationJsr305AnnotationsCheck, com.puppycrawl.tools.checkstyle.checks.javadocJsr305AnnotationsCheck, com.puppycrawl.tools.checkstyle.checks.metricsJsr305AnnotationsCheck, com.puppycrawl.tools.checkstyle.checks.modifierJsr305AnnotationsCheck, com.puppycrawl.tools.checkstyle.checks.namingJsr305AnnotationsCheck, com.puppycrawl.tools.checkstyle.checks.regexpJsr305AnnotationsCheck, com.puppycrawl.tools.checkstyle.checks.sizesJsr305AnnotationsCheck, com.puppycrawl.tools.checkstyle.checks.whitespaceJsr305AnnotationsCheck, com.puppycrawl.tools.checkstyle.checksJsr305AnnotationsCheck, com.puppycrawl.tools.checkstyle.filefiltersJsr305AnnotationsCheck, com.puppycrawl.tools.checkstyle.filtersJsr305AnnotationsCheck, com.puppycrawl.tools.checkstyleJsr305AnnotationsCheck, com.github.sevntu.checkstyle.checks.annotationJsr305AnnotationsCheck, com.github.sevntu.checkstyle.checks.codingJsr305AnnotationsCheck, com.github.sevntu.checkstyle.checks.designJsr305AnnotationsCheck, com.github.sevntu.checkstyle.checks.namingJsr305AnnotationsCheck, com.github.sevntu.checkstyle.checks.sizesJsr305AnnotationsCheck, com.github.sevntu.checkstyle.checksJsr305AnnotationsCheck, com.github.sevntu.checkstyleJsr305AnnotationsCheck, de.bjrke.checkstyle.jsr305.Jsr305AnnotationsCheck. Please recheck that class name is specified as canonical name or read how to configure short name usage http://checkstyle.sourceforge.net/config.html#Packages. Please also recheck that provided ClassLoader to Checker is configured correctly.
	at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:457)
	at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:171)
	at net.sf.eclipsecs.core.builder.CheckerFactory.createCheckerInternal(CheckerFactory.java:290)
	at net.sf.eclipsecs.core.builder.CheckerFactory.createChecker(CheckerFactory.java:128)
	at net.sf.eclipsecs.core.builder.Auditor.runAudit(Auditor.java:141)
	at net.sf.eclipsecs.core.builder.CheckstyleBuilder.handleBuildSelection(CheckstyleBuilder.java:301)
	at net.sf.eclipsecs.core.builder.CheckstyleBuilder.build(CheckstyleBuilder.java:172)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:735)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:301)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:304)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:263)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:403)
	at org.eclipse.core.internal.resources.Project$1.run(Project.java:551)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
	at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:529)
	at org.eclipse.core.internal.resources.Project.build(Project.java:112)
	at net.sf.eclipsecs.core.jobs.BuildProjectJob.run(BuildProjectJob.java:87)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

After downgrading to version 7.6.0 it works like a charm.

@bjrke
Copy link
Owner

bjrke commented Oct 16, 2017

First of all, sorry for my late answer

I've already hit the problem and there is a discussion in the eclipse-cs project
https://sourceforge.net/p/eclipse-cs/discussion/274377/thread/4ab4f095/

there is a general problem in checkstyles way of loading classes which can not work in eclipse's OSGI environment. So it has to be fixed in checkstyle.
checkstyle/checkstyle#4916

Please vote this issue up

Anyway I already fixed checkstyle-8 native support in e5fdf3c but I did not build a release because of the incompatibility against checkstyle in eclipse.

@bjrke bjrke self-assigned this Oct 16, 2017
@bjrke
Copy link
Owner

bjrke commented Dec 20, 2017

eclipse-cs 8.5 is out and supports plugins again. This will fix this issue and I will make a release.

@bjrke bjrke closed this as completed in b46ea5f Dec 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants