Sonarlint crashes in eclipse, unable to analyze HTML file

html
sonarlint

(Alexandre Touret) #1

Template for a good bug report, formatted with Markdown:

  • versions used
    eclipse photon
    sonarlint 3.6

java version “1.8.0_172”
Java™ SE Runtime Environment (build 1.8.0_172-b11)
Java HotSpot™ 64-Bit Server VM (build 25.172-b11, mixed mode)

  • error observed
eclipse.buildId=4.8.0.I20180611-0500
java.version=1.8.0_172
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=fr_FR
Framework arguments:  -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -data file:/C:/_alexandre_touret_data/eclipse/

org.eclipse.core.jobs
Error
Thu Aug 23 13:32:22 CEST 2018
An internal error occurred during: "SonarLint analysis of project difqualitysample-all (12 files to analyze, 0 excluded)".

java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
	at org.sonar.channel.ChannelDispatcher.<clinit>(ChannelDispatcher.java:32)
	at org.sonar.plugins.web.lex.PageLexer.parse(PageLexer.java:90)
	at org.sonar.plugins.web.core.WebSensor.execute(WebSensor.java:98)
	at org.sonarsource.sonarlint.core.analyzer.sensor.SensorWrapper.analyse(SensorWrapper.java:52)
	at org.sonarsource.sonarlint.core.analyzer.sensor.AllSensorsExecutor.executeSensor(AllSensorsExecutor.java:79)
	at org.sonarsource.sonarlint.core.analyzer.sensor.AllSensorsExecutor.execute(AllSensorsExecutor.java:67)
	at org.sonarsource.sonarlint.core.analyzer.sensor.PhaseExecutor.execute(PhaseExecutor.java:36)
	at org.sonarsource.sonarlint.core.container.analysis.AnalysisContainer.doAfterStart(AnalysisContainer.java:141)
	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.storage.StorageAnalyzer.analyze(StorageAnalyzer.java:75)
	at org.sonarsource.sonarlint.core.container.storage.StorageContainerHandler.analyze(StorageContainerHandler.java:76)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.lambda$analyze$0(ConnectedSonarLintEngineImpl.java:152)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.withReadLock(ConnectedSonarLintEngineImpl.java:339)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.withReadLock(ConnectedSonarLintEngineImpl.java:329)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.analyze(ConnectedSonarLintEngineImpl.java:150)
	at org.sonarlint.eclipse.core.internal.server.Server.runAnalysis(Server.java:277)
	at org.sonarlint.eclipse.core.internal.jobs.AnalyzeProjectJob.run(AnalyzeProjectJob.java:453)
	at org.sonarlint.eclipse.core.internal.jobs.AnalyzeProjectJob.runAnalysisAndUpdateMarkers(AnalyzeProjectJob.java:204)
	at org.sonarlint.eclipse.core.internal.jobs.AnalyzeProjectJob.doRun(AnalyzeProjectJob.java:160)
	at org.sonarlint.eclipse.core.internal.jobs.AbstractSonarProjectJob.runInWorkspace(AbstractSonarProjectJob.java:43)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:60)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory cannot be found by org.sonarsource.sonarlint.core.sonarlint-core_3.7.0.1730
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:508)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:419)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:411)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 23 more

Session Data

eclipse.buildId=4.8.0.I20180611-0500
java.version=1.8.0_172
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=fr_FR
Framework arguments:  -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -data file:/C:/_alexandre_touret_data/eclipse/

  • steps to reproduce
    Bind a project to a server
    Start an analysis on whole project or on a particular file

  • potential workaround
    No


(Johannes Becker) #2

Same here. SonarLint v3.6.0.201806071228

eclipse.buildId=4.8.0.I20180611-0500
java.version=10.0.1
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product

(Nicolas Bontoux) #3

This looks similar to stacktrace discussed here:

With following ticket planned:


(Julien Henry) #4

Hi,

I think you can workaround your issue by updating to the latest version of the SonarHTML (ex SonarWeb) plugin on your SonarQube server.