SonarLint throwing IllegalStateException for missing files in 'target' directory.

46 views
Skip to first unread message

mlgi...@gmail.com

unread,
Jan 23, 2017, 11:38:52 PM1/23/17
to SonarLint
This was originally posted in the sonarqube discussion.  I was asked to post it here in the sonarlint.

  
sonarlint is reporting an error on the MANIFEST.MF file for the war submodule of a project.  When I look at the project, the file DOES exist, so it looks like sonarlint is trying to open the file while/before it is being created.  I've tried adding exclusions to the project as follows with no luck.   How can I prevent this error.

        <sonar.exclusions>
          target/m2e-wtp/**/*
        </sonar.exclusions>


java.lang.IllegalStateException: Fail to read file 'C:\Users\mgiroux\git\b2b-applications-yelp\yelp-b2b-ear\target\m2e-wtp\ear-resources\META-INF\MANIFEST.MF' with encoding 'UTF-8'
at org.sonarsource.sonarlint.core.container.analysis.filesystem.FileMetadata.readFile(FileMetadata.java:163)
at org.sonarsource.sonarlint.core.container.analysis.filesystem.FileMetadata.readMetadata(FileMetadata.java:139)
at org.sonarsource.sonarlint.core.container.analysis.filesystem.InputFileBuilder.create(InputFileBuilder.java:49)
at org.sonarsource.sonarlint.core.container.analysis.filesystem.FileIndexer.indexFile(FileIndexer.java:85)
at org.sonarsource.sonarlint.core.container.analysis.filesystem.FileIndexer.indexFiles(FileIndexer.java:80)
at org.sonarsource.sonarlint.core.container.analysis.filesystem.FileIndexer.index(FileIndexer.java:68)
at org.sonarsource.sonarlint.core.container.analysis.filesystem.SonarLintFileSystem.index(SonarLintFileSystem.java:39)
at org.sonarsource.sonarlint.core.analyzer.sensor.PhaseExecutor.execute(PhaseExecutor.java:42)
at org.sonarsource.sonarlint.core.container.analysis.AnalysisContainer.doAfterStart(AnalysisContainer.java:143)
at org.sonarsource.sonarlint.core.container.ComponentContainer.startComponents(ComponentContainer.java:125)
at org.sonarsource.sonarlint.core.container.ComponentContainer.execute(ComponentContainer.java:110)
at org.sonarsource.sonarlint.core.container.standalone.StandaloneGlobalContainer.analyze(StandaloneGlobalContainer.java:118)
at org.sonarsource.sonarlint.core.StandaloneSonarLintEngineImpl.analyze(StandaloneSonarLintEngineImpl.java:93)
at org.sonarsource.sonarlint.core.StandaloneSonarLintEngineImpl.analyze(StandaloneSonarLintEngineImpl.java:83)
at org.sonarlint.eclipse.core.internal.jobs.StandaloneSonarLintClientFacade.runAnalysis(StandaloneSonarLintClientFacade.java:60)
at org.sonarlint.eclipse.core.internal.jobs.AnalyzeProjectJob.run(AnalyzeProjectJob.java:457)
at org.sonarlint.eclipse.core.internal.jobs.AnalyzeProjectJob$AnalysisThread.run(AnalyzeProjectJob.java:127)
Caused by: java.io.FileNotFoundException: C:\Users\mgiroux\git\b2b-applications-yelp\yelp-b2b-ear\target\m2e-wtp\ear-resources\META-INF\MANIFEST.MF (The system cannot find the path specified)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at org.sonarsource.sonarlint.core.container.analysis.filesystem.FileMetadata.readFile(FileMetadata.java:158)
... 16 more

Julien HENRY

unread,
Jan 24, 2017, 4:00:42 AM1/24/17
to Michael Giroux, SonarLint
Hi Michael,

NExt release of SonarLint should fix your issue, thanks to:

In the meantime, you can disable automatic analysis on the ear project (yelp-b2b-ear) since I guess there is no code in it.

++

Julien

--
You received this message because you are subscribed to the Google Groups "SonarLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarlint/8d6cd05d-b764-4558-a150-762494faf319%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages