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

CheckStylePluginException: The inspection could not be executed #150

Closed
mikrobestie opened this issue Apr 10, 2015 · 11 comments
Closed

CheckStylePluginException: The inspection could not be executed #150

mikrobestie opened this issue Apr 10, 2015 · 11 comments

Comments

@mikrobestie
Copy link

Hello again,

I'm now using the newest version of your checkstyle plugin, and it fails to scan any file. The exception thrown is:

The inspection could not be executed.
org.infernus.idea.checkstyle.exception.CheckStylePluginException: The inspection could not be executed.
    at org.infernus.idea.checkstyle.CheckStylePlugin.processError(CheckStylePlugin.java:120)
    at org.infernus.idea.checkstyle.CheckStyleInspection.checkFile(CheckStyleInspection.java:240)
    at com.intellij.codeInspection.LocalInspectionTool$1.visitFile(LocalInspectionTool.java:151)
    at com.intellij.psi.impl.source.PsiJavaFileBaseImpl.accept(PsiJavaFileBaseImpl.java:412)
    at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:80)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$4.process(LocalInspectionsPass.java:309)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$4.process(LocalInspectionsPass.java:304)
    at com.intellij.concurrency.ApplierCompleter.a(ApplierCompleter.java:122)
    at com.intellij.concurrency.ApplierCompleter.access$000(ApplierCompleter.java:44)
    at com.intellij.concurrency.ApplierCompleter$1.run(ApplierCompleter.java:85)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1104)
    at com.intellij.concurrency.ApplierCompleter$2.run(ApplierCompleter.java:94)
    at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:452)
    at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:449)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:402)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
    at com.intellij.concurrency.ApplierCompleter.a(ApplierCompleter.java:106)
    at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:82)
    at jsr166e.CountedCompleter.exec(CountedCompleter.java:684)
    at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:260)
    at jsr166e.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:858)
    at jsr166e.ForkJoinPool.scan(ForkJoinPool.java:1687)
    at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1642)
    at jsr166e.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:109)
Caused by: java.lang.NullPointerException
    at com.google.common.io.Flushables.flush(Flushables.java:56)
    at com.puppycrawl.tools.checkstyle.PropertyCacheFile.flushAndCloseOutStream(PropertyCacheFile.java:135)
    at com.puppycrawl.tools.checkstyle.PropertyCacheFile.destroy(PropertyCacheFile.java:123)
    at com.puppycrawl.tools.checkstyle.TreeWalker.destroy(TreeWalker.java:499)
    at com.puppycrawl.tools.checkstyle.Checker.process(Checker.java:299)
    at org.infernus.idea.checkstyle.CheckStyleInspection.scanFile(CheckStyleInspection.java:281)
    at org.infernus.idea.checkstyle.CheckStyleInspection.checkFile(CheckStyleInspection.java:227)
    ... 22 more

I can post our configuration file if it's needed. Thank you for your time.

@jshiell
Copy link
Owner

jshiell commented Apr 10, 2015

Hello. Could you please post your configuration, as that exception seems to be coming out of CheckStyle itself (which is rather worrying)? It may be related to checkstyle/checkstyle#836.

@mikrobestie
Copy link
Author

Sure, here it is.

https://drive.google.com/open?id=0B2Ztw8w27QIAel9PeHNkbEJfTlE&authuser=0

The strange thing is that everything is fine, when I run checkstyle as a maven goal with the same configuration.

@jshiell
Copy link
Owner

jshiell commented Apr 10, 2015

Thanks. That is indeed strange. Which version of the Maven plugin are you using?

@jshiell
Copy link
Owner

jshiell commented Apr 10, 2015

It looks like checkstyle-maven-plugin 2.15 is using CheckStyle 6.1.1, whereas the plugin is using CheckStyle 6.5.

@mikrobestie
Copy link
Author

Yes but we have overriden checkstyle version in maven plugin to 6.5, and it works.

@jshiell
Copy link
Owner

jshiell commented Apr 10, 2015

The Drive file is access controlled, so the access request from infernus.org is me.

@jshiell
Copy link
Owner

jshiell commented Apr 10, 2015

Thanks. I fear it does look like a CheckStyle bug - I'll raise a CheckStyle bug if you're happy for me to share your config with the CheckStyle devs (and hence GitHub)?

 testcase ∞  java -jar ../checkstyle-6.5-all.jar -c issue-150.xml LocationPanel.java                               jshiell@RecentConvert
Exception in thread "main" java.lang.NullPointerException
    at com.google.common.io.Flushables.flush(Flushables.java:56)
    at com.puppycrawl.tools.checkstyle.PropertyCacheFile.flushAndCloseOutStream(PropertyCacheFile.java:135)
    at com.puppycrawl.tools.checkstyle.PropertyCacheFile.destroy(PropertyCacheFile.java:123)
    at com.puppycrawl.tools.checkstyle.TreeWalker.destroy(TreeWalker.java:499)
    at com.puppycrawl.tools.checkstyle.Checker.process(Checker.java:299)
    at com.puppycrawl.tools.checkstyle.Main.main(Main.java:125)

@mikrobestie
Copy link
Author

It doesn't matter, we would be glad to have this issue resolved for everyone. Thanks!

@jshiell
Copy link
Owner

jshiell commented Apr 11, 2015

Thanks - raised as checkstyle:931. Once they release a patch I'll update the plugin and close this off.

@jshiell
Copy link
Owner

jshiell commented Apr 27, 2015

Looks like 6.6 is now out - I'll try get this out later this week.

jshiell added a commit that referenced this issue Apr 27, 2015
@jshiell
Copy link
Owner

jshiell commented Apr 27, 2015

Released as 4.15.0. Thanks for your help.

@jshiell jshiell closed this as completed Apr 27, 2015
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