NullPointerException During SonarLint Analysis in Eclipse

sonarlint

(Nick McGill) #1

Version Information:
Eclipse Platform 4.6.3
SonarLint Plugin 3.6.0

Error Observed:

Error during execution of SonarLint analysis
java.lang.NullPointerException
	at org.sonarlint.eclipse.core.internal.proto.Sonarlint$Issues$Issue$Builder.setType(Sonarlint.java:1619)
	at org.sonarlint.eclipse.core.internal.tracking.IssueStore.transform(IssueStore.java:119)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
	at org.sonarlint.eclipse.core.internal.tracking.IssueStore.transform(IssueStore.java:103)
	at org.sonarlint.eclipse.core.internal.tracking.IssueStore.save(IssueStore.java:70)
	at org.sonarlint.eclipse.core.internal.tracking.PersistentIssueTrackerCache$LimitedSizeLinkedHashMap.removeEldestEntry(PersistentIssueTrackerCache.java:59)
	at java.util.LinkedHashMap.afterNodeInsertion(LinkedHashMap.java:299)
	at java.util.HashMap.putVal(HashMap.java:664)
	at java.util.HashMap.put(HashMap.java:612)
	at org.sonarlint.eclipse.core.internal.tracking.PersistentIssueTrackerCache.put(PersistentIssueTrackerCache.java:105)
	at org.sonarlint.eclipse.core.internal.tracking.IssueTracker.updateCache(IssueTracker.java:61)
	at org.sonarlint.eclipse.core.internal.jobs.AnalyzeProjectJob.trackIssues(AnalyzeProjectJob.java:346)
	at org.sonarlint.eclipse.core.internal.jobs.AnalyzeProjectJob.updateMarkers(AnalyzeProjectJob.java:303)
	at org.sonarlint.eclipse.core.internal.jobs.AnalyzeProjectJob.runAnalysisAndUpdateMarkers(AnalyzeProjectJob.java:206)
	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:55)

I have no special steps to reproduce. It happens for me whenever I initiate analysis of a project.

No known workaround using the plugin. I can successfully scan using SonarScanner, but I’m trying to leverage the plugin functionality to provide a report at the moment.


(Patrik Jetzer) #2

I’m experiencing the exact same issue after upgrading to SonarQube Server from 7.2 to “Version 7.3 (build 15553)”
I have tested with SonarLint Plugin Version 3.4 & 3.6.