SonarLint 8.1 not working for JDK 11 based Eclipse 4.23

Please provide

  • Operating system: Windows 11
  • SonarLint plugin version: 8.1.0.80220
  • Programming language you’re coding in: Java
  • Is connected mode used: SonarQube

And a thorough description of the problem / question:
I’ve created an application based on Eclipse 4.23 and JDK 11. I’m facing NullPointException when I try to analyze a COBOL code using SonarLint 8.1.0.80220. I can easily analyze the same code using the SonarLint 8.0.0.80157 and below without any issue. Attaching the stack trace:

Starting SonarLint for Eclipse 8.1.0.80220
Started embedded server on port 64123
SonarLint processing file /Local/testcobol.cob...
Found 53 issue(s)
SonarLint processing file /Local/testcobol.cob...
Found 53 issue(s)
Error during execution of SonarLint analysis
java.lang.NullPointerException
	at java.base/java.util.Objects.requireNonNull(Unknown Source)
	at java.base/java.util.Optional.flatMap(Unknown Source)
	at org.sonarlint.eclipse.core.internal.tracking.ProjectIssueTracker.lambda$3(ProjectIssueTracker.java:142)
	at java.base/java.util.HashMap.forEach(Unknown Source)
	at org.sonarlint.eclipse.core.internal.tracking.ProjectIssueTracker.trackWithServerIssues(ProjectIssueTracker.java:141)
	at org.sonarlint.eclipse.core.internal.jobs.AnalyzeConnectedProjectJob.trackFileIssues(AnalyzeConnectedProjectJob.java:90)
	at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.trackIssues(AbstractAnalyzeProjectJob.java:324)
	at org.sonarlint.eclipse.core.internal.jobs.AnalyzeConnectedProjectJob.trackIssues(AnalyzeConnectedProjectJob.java:78)
	at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.lambda$19(AbstractAnalyzeProjectJob.java:295)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2315)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2335)
	at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.updateMarkers(AbstractAnalyzeProjectJob.java:295)
	at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.runAnalysisAndUpdateMarkers(AbstractAnalyzeProjectJob.java:202)
	at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.doRun(AbstractAnalyzeProjectJob.java:156)
	at org.sonarlint.eclipse.core.internal.jobs.AbstractSonarJob.run(AbstractSonarJob.java:37)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Hey @Ritam_Biswas,

this SonarLint version is way outdated. The current SonarLint version is 10.0.1.81733. Please update and check if the error still persists, if you encounter any issues, please let me know.

You say you use an IDE based on Eclipse 4.23? Is it a specific COBOL IDE like the ones we support officially?

Best,
Tobias

Hi Tobias,

My editor is currently based on JDK 11. So as per the compatibility requirements, the Sonarlint v10.0.1 won’t run on our editor.
Interestingly, I still installed the v9.2 on my editor, and got the NullPointException stack trace, which is exactly the same as the one I mentioned above that showed for v8.1. Curious how that could happen as 8.1 should work on JDK 11. Also, how could the error be exactly same as the 9.2 version(9.2 is not compatible with JDK 11)?
And yes, Sonarlint till 8.0 is working fine on my IDE, so Sonarlint is indeed supported.

Regards,
Ritam

Hi @Ritam_Biswas,

the requirements for JDK 17 are currently soft, therefore SonarLint 10.0.1 is also compatible with your IDE :smile:

Due to us only fixing the latest version, may I ask you to update it to 10.0.1 please, and check if the issue still persists? I assume so yes, but the stack trace might be different - I need it for further investigation and to check if it is similar to another issue reported to us!
For that, please then provide me with the full logs as described HERE.

Please, as requested, also provide me with the type of COBOL plug-ins you are using. Are you perhaps using Visual COBOL from Micro Focus or another COBOL plug-in from another vendor (see other options HERE)? If you don’t know, you can also share just the whole list of installed plug-ins with me please. If you don’t feel comfortable with sharing it on the thread, just hit me up with a private message :smile:

Another question: Have you set specific properties for SonarLint in order to configure the file suffixes of the COBOL files?

Best,
Tobias

Hi Tobias,
I’d like to take this up privately. But I probably don’t have access to private messaging on Sonar Community yet. Can I get your mail or something through which I can connect with you?
Thanks,
Ritam :slight_smile: