SonarLint 6.2 fails with Java 1.8 in Eclipse

Please provide

  • Operating system: Windows 11
  • SonarLint plugin version: 6.2.0.37299
  • Programming language you’re coding in: Java 1.8
  • Is connected mode used:
    • Connected SonarQube (and which version): SonarQube 10.1

And a thorough description of the problem / question:

There appears to be an incompatibility with this IacPlugin which seems to block SonarLint according to this log:

Starting SonarLint for Eclipse 6.2.0.37299
Starting SonarLint engine for connection 'SonarQube'...
Found Secrets detection plugin: bundleentry://2083.fwk-1472614295/plugins/sonar-secrets-plugin-1.1.0.36766.jar
Create : C:\Users\vagrant\.sonarlint\plugins
Plugin cache: C:\Users\vagrant\.sonarlint\plugins
Create : C:\Users\vagrant\.sonarlint\plugins\_tmp
Load plugins
Load plugins (done) | time=0ms
No plugins loaded
No storage for connection 'SonarQube'. Please update.
GET 200 https://sonar-cicd.why.biz/api/developers/search_events?projects=&from= | response time=533ms
Started security hotspot handler on port 64120
Create : C:\Users\vagrant\.sonarlint\plugins
Plugin cache: C:\Users\vagrant\.sonarlint\plugins
Create : C:\Users\vagrant\.sonarlint\plugins\_tmp
GET 200 https://sonar-cicd.why.biz/api/system/status | response time=97ms
Downloaded server infos in 128ms
GET 200 https://sonar-cicd.why.biz/api/plugins/installed | response time=99ms
Downloaded plugin list in 114ms
GET 200 https://sonar-cicd.why.biz/api/settings/values.protobuf | response time=110ms
Downloaded settings in 162ms
Code analyzer 'ansible' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'csharp' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'cpp' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'cayc' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'config' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'dbd' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'dbdjavafrontend' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'dbdpythonfrontend' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'flex' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'jacoco' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'swift' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'text' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'vbnet' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'vb' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'security' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'securitycsharpfrontend' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'securityjsfrontend' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'securityjavafrontend' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'securityphpfrontend' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'securitypythonfrontend' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'yaml' is not compatible with SonarLint. Skip downloading it.
Code analyzer 'jdepend' is not compatible with SonarLint. Skip downloading it.
Download plugin 'sonar-abap-plugin-3.12.0.4303.jar' to 'C:\Users\vagrant\.sonarlint\plugins\_tmp\2160607483375194184.tmp'...
GET 200 https://sonar-cicd.why.biz/api/plugins/download?plugin=abap | response time=97ms
Downloaded 'abap' in 516ms
Create : C:\Users\vagrant\.sonarlint\plugins\b9457301b81c2970cfea901958fe2d82
Download plugin 'sonar-apex-plugin-1.13.0.4374.jar' to 'C:\Users\vagrant\.sonarlint\plugins\_tmp\9058144363300238771.tmp'...
GET 200 https://sonar-cicd.why.biz/api/plugins/download?plugin=sonarapex | response time=94ms
Downloaded 'sonarapex' in 645ms
Create : C:\Users\vagrant\.sonarlint\plugins\1d39d486ef7b824ef1ab7897257afecc
Download plugin 'sonar-cobol-plugin-5.3.0.6122.jar' to 'C:\Users\vagrant\.sonarlint\plugins\_tmp\4170293547995688820.tmp'...
GET 200 https://sonar-cicd.why.biz/api/plugins/download?plugin=cobol | response time=97ms
Downloaded 'cobol' in 636ms
Create : C:\Users\vagrant\.sonarlint\plugins\4ee62dbf273babc4460e0fdd4069a204
Download plugin 'sonar-go-plugin-1.13.0.4374.jar' to 'C:\Users\vagrant\.sonarlint\plugins\_tmp\2644471323578882451.tmp'...
GET 200 https://sonar-cicd.why.biz/api/plugins/download?plugin=go | response time=97ms
Downloaded 'go' in 1425ms
Create : C:\Users\vagrant\.sonarlint\plugins\73fb45f6fdb3edb881fd73ef59fb152b
Download plugin 'sonar-html-plugin-3.8.0.3510.jar' to 'C:\Users\vagrant\.sonarlint\plugins\_tmp\7907422750395120195.tmp'...
GET 200 https://sonar-cicd.why.biz/api/plugins/download?plugin=web | response time=97ms
Downloaded 'web' in 194ms
Create : C:\Users\vagrant\.sonarlint\plugins\7f73700c5af37d92b8a30bc379150f5a
Download plugin 'sonar-iac-plugin-1.17.0.3976.jar' to 'C:\Users\vagrant\.sonarlint\plugins\_tmp\7892421180008701057.tmp'...
GET 200 https://sonar-cicd.why.biz/api/plugins/download?plugin=iac | response time=102ms
Downloaded 'iac' in 360ms
Create : C:\Users\vagrant\.sonarlint\plugins\c9c147ba88e94e09bb2fc3c476bdc582
Download plugin 'sonar-java-plugin-7.20.0.31692.jar' to 'C:\Users\vagrant\.sonarlint\plugins\_tmp\5987817925473782046.tmp'...
GET 200 https://sonar-cicd.why.biz/api/plugins/download?plugin=java | response time=98ms
Downloaded 'java' in 2874ms
Create : C:\Users\vagrant\.sonarlint\plugins\987cc5b525378ba82c7dbc66dd6b0d2b
Download plugin 'sonar-javascript-plugin-10.3.1.21905.jar' to 'C:\Users\vagrant\.sonarlint\plugins\_tmp\5606031283162256183.tmp'...
GET 200 https://sonar-cicd.why.biz/api/plugins/download?plugin=javascript | response time=95ms
Downloaded 'javascript' in 3560ms
Create : C:\Users\vagrant\.sonarlint\plugins\a35df5415a0ce048373adbf3efa68016
Download plugin 'sonar-kotlin-plugin-2.15.0.2579.jar' to 'C:\Users\vagrant\.sonarlint\plugins\_tmp\6308503390919917386.tmp'...
GET 200 https://sonar-cicd.why.biz/api/plugins/download?plugin=kotlin | response time=98ms
Downloaded 'kotlin' in 6171ms
Create : C:\Users\vagrant\.sonarlint\plugins\11f2a20ca8b92acc9a731d43f5b8572f
Download plugin 'sonar-php-plugin-3.30.0.9766.jar' to 'C:\Users\vagrant\.sonarlint\plugins\_tmp\2424297518759993749.tmp'...
GET 200 https://sonar-cicd.why.biz/api/plugins/download?plugin=php | response time=96ms
Downloaded 'php' in 1094ms
Create : C:\Users\vagrant\.sonarlint\plugins\a912f602c6b3472e949279f68839e090
Download plugin 'sonar-pli-plugin-1.13.0.3651.jar' to 'C:\Users\vagrant\.sonarlint\plugins\_tmp\1108880468148875830.tmp'...
GET 200 https://sonar-cicd.why.biz/api/plugins/download?plugin=pli | response time=86ms
Downloaded 'pli' in 204ms
Create : C:\Users\vagrant\.sonarlint\plugins\98dda145524fd2456126c9c40c66e05c
Download plugin 'sonar-plsql-plugin-3.9.0.5181.jar' to 'C:\Users\vagrant\.sonarlint\plugins\_tmp\2418618618328016387.tmp'...
GET 200 https://sonar-cicd.why.biz/api/plugins/download?plugin=plsql | response time=94ms
Downloaded 'plsql' in 438ms
Create : C:\Users\vagrant\.sonarlint\plugins\e45538148ac0cbe4020d0f1ab2be4a4e
Download plugin 'sonar-python-plugin-4.3.0.11660.jar' to 'C:\Users\vagrant\.sonarlint\plugins\_tmp\3757386831086099685.tmp'...
GET 200 https://sonar-cicd.why.biz/api/plugins/download?plugin=python | response time=96ms
Downloaded 'python' in 1605ms
Create : C:\Users\vagrant\.sonarlint\plugins\1010e261b29124c0b1c46424747385c5
Download plugin 'sonar-rpg-plugin-3.4.0.3394.jar' to 'C:\Users\vagrant\.sonarlint\plugins\_tmp\1794610023049094358.tmp'...
GET 200 https://sonar-cicd.why.biz/api/plugins/download?plugin=rpg | response time=91ms
Downloaded 'rpg' in 294ms
Create : C:\Users\vagrant\.sonarlint\plugins\32aa7ac96c2e333a861e485371ccb162
Download plugin 'sonar-ruby-plugin-1.13.0.4374.jar' to 'C:\Users\vagrant\.sonarlint\plugins\_tmp\4141241918012725557.tmp'...
GET 200 https://sonar-cicd.why.biz/api/plugins/download?plugin=ruby | response time=100ms
Downloaded 'ruby' in 2498ms
Create : C:\Users\vagrant\.sonarlint\plugins\741ad6ded64c2eb50ace0ac17d726a8a
Download plugin 'sonar-scala-plugin-1.13.0.4374.jar' to 'C:\Users\vagrant\.sonarlint\plugins\_tmp\7152587357640530155.tmp'...
GET 200 https://sonar-cicd.why.biz/api/plugins/download?plugin=sonarscala | response time=97ms
Downloaded 'sonarscala' in 2228ms
Create : C:\Users\vagrant\.sonarlint\plugins\79b9398264d2552b11f9a32dc6303231
Download plugin 'sonar-tsql-plugin-1.9.0.5692.jar' to 'C:\Users\vagrant\.sonarlint\plugins\_tmp\5266721086786227104.tmp'...
GET 200 https://sonar-cicd.why.biz/api/plugins/download?plugin=tsql | response time=96ms
Downloaded 'tsql' in 353ms
Create : C:\Users\vagrant\.sonarlint\plugins\eb3550f691928e2958eea420a39272f9
Download plugin 'sonar-xml-plugin-2.8.1.4006.jar' to 'C:\Users\vagrant\.sonarlint\plugins\_tmp\870188751659053220.tmp'...
GET 200 https://sonar-cicd.why.biz/api/plugins/download?plugin=xml | response time=95ms
Downloaded 'xml' in 517ms
Create : C:\Users\vagrant\.sonarlint\plugins\03c11a5c6bfd02aea6a5a6d869b07e93
GET 200 https://sonar-cicd.why.biz/api/rules/search.protobuf?f=repo,name,severity,lang,htmlDesc,htmlNote,internalKey,isTemplate,templateKey,actives&statuses=BETA,DEPRECATED,READY&types=CODE_SMELL,BUG,VULNERABILITY&severities=INFO&languages=abap,apex,cs,cobol,web,java,js,kotlin,php,pli,plsql,py,rpg,ruby,scala,secrets,tsql,jsp,xml,xoo&p=1&ps=500 | response time=131ms
GET 200 https://sonar-cicd.why.biz/api/rules/search.protobuf?f=repo,name,severity,lang,htmlDesc,htmlNote,internalKey,isTemplate,templateKey,actives&statuses=BETA,DEPRECATED,READY&types=CODE_SMELL,BUG,VULNERABILITY&severities=MINOR&languages=abap,apex,cs,cobol,web,java,js,kotlin,php,pli,plsql,py,rpg,ruby,scala,secrets,tsql,jsp,xml,xoo&p=1&ps=500 | response time=203ms
GET 200 https://sonar-cicd.why.biz/api/rules/search.protobuf?f=repo,name,severity,lang,htmlDesc,htmlNote,internalKey,isTemplate,templateKey,actives&statuses=BETA,DEPRECATED,READY&types=CODE_SMELL,BUG,VULNERABILITY&severities=MINOR&languages=abap,apex,cs,cobol,web,java,js,kotlin,php,pli,plsql,py,rpg,ruby,scala,secrets,tsql,jsp,xml,xoo&p=2&ps=500 | response time=131ms
GET 200 https://sonar-cicd.why.biz/api/rules/search.protobuf?f=repo,name,severity,lang,htmlDesc,htmlNote,internalKey,isTemplate,templateKey,actives&statuses=BETA,DEPRECATED,READY&types=CODE_SMELL,BUG,VULNERABILITY&severities=MAJOR&languages=abap,apex,cs,cobol,web,java,js,kotlin,php,pli,plsql,py,rpg,ruby,scala,secrets,tsql,jsp,xml,xoo&p=1&ps=500 | response time=211ms
GET 200 https://sonar-cicd.why.biz/api/rules/search.protobuf?f=repo,name,severity,lang,htmlDesc,htmlNote,internalKey,isTemplate,templateKey,actives&statuses=BETA,DEPRECATED,READY&types=CODE_SMELL,BUG,VULNERABILITY&severities=MAJOR&languages=abap,apex,cs,cobol,web,java,js,kotlin,php,pli,plsql,py,rpg,ruby,scala,secrets,tsql,jsp,xml,xoo&p=2&ps=500 | response time=252ms
GET 200 https://sonar-cicd.why.biz/api/rules/search.protobuf?f=repo,name,severity,lang,htmlDesc,htmlNote,internalKey,isTemplate,templateKey,actives&statuses=BETA,DEPRECATED,READY&types=CODE_SMELL,BUG,VULNERABILITY&severities=MAJOR&languages=abap,apex,cs,cobol,web,java,js,kotlin,php,pli,plsql,py,rpg,ruby,scala,secrets,tsql,jsp,xml,xoo&p=3&ps=500 | response time=169ms
GET 200 https://sonar-cicd.why.biz/api/rules/search.protobuf?f=repo,name,severity,lang,htmlDesc,htmlNote,internalKey,isTemplate,templateKey,actives&statuses=BETA,DEPRECATED,READY&types=CODE_SMELL,BUG,VULNERABILITY&severities=CRITICAL&languages=abap,apex,cs,cobol,web,java,js,kotlin,php,pli,plsql,py,rpg,ruby,scala,secrets,tsql,jsp,xml,xoo&p=1&ps=500 | response time=207ms
GET 200 https://sonar-cicd.why.biz/api/rules/search.protobuf?f=repo,name,severity,lang,htmlDesc,htmlNote,internalKey,isTemplate,templateKey,actives&statuses=BETA,DEPRECATED,READY&types=CODE_SMELL,BUG,VULNERABILITY&severities=BLOCKER&languages=abap,apex,cs,cobol,web,java,js,kotlin,php,pli,plsql,py,rpg,ruby,scala,secrets,tsql,jsp,xml,xoo&p=1&ps=500 | response time=173ms
GET 200 https://sonar-cicd.why.biz/api/qualityprofiles/search.protobuf | response time=112ms
Downloaded quality profiles in 128ms
Page downloaded in 113ms
Create : C:\Users\vagrant\.sonarlint\plugins
Plugin cache: C:\Users\vagrant\.sonarlint\plugins
Create : C:\Users\vagrant\.sonarlint\plugins\_tmp
Copy plugin bundleentry://2083.fwk-1472614295/plugins/sonar-secrets-plugin-1.1.0.36766.jar to C:\Users\vagrant\.sonarlint\plugins\_tmp\7058084386916561920.tmp
Create : C:\Users\vagrant\.sonarlint\plugins\ee07b55040de44c055d067af665d3a8a
Load plugins
Plugin 'HTML Code Quality and Security' requires JRE 11 while current is 1.8. Skip loading it.
Plugin 'Java Code Quality and Security' requires JRE 11 while current is 1.8. Skip loading it.
Plugin 'JavaScript/TypeScript/CSS Code Quality and Security' requires JRE 11 while current is 1.8. Skip loading it.
Plugin 'JavaScript/TypeScript/CSS Code Quality and Security' requires Node.js 14.17.0. Skip loading it.
Plugin 'Kotlin Code Quality and Security' requires JRE 11 while current is 1.8. Skip loading it.
Plugin 'PHP Code Quality and Security' requires JRE 11 while current is 1.8. Skip loading it.
Plugin 'PL/I Code Quality and Security' requires JRE 11 while current is 1.8. Skip loading it.
Plugin 'Python Code Quality and Security' requires JRE 11 while current is 1.8. Skip loading it.
Plugin 'RPG Code Quality' requires JRE 11 while current is 1.8. Skip loading it.
Plugin 'XML Code Quality and Security' requires plugin API 9.9 while SonarLint supports only up to 8.9. Skip loading it.
Load plugins (done) | time=67ms
Unable to start the SonarLint engine
java.lang.IllegalStateException: The plugin [iac] does not support Java 1.8.0_211
	at org.sonarsource.sonarlint.core.plugin.PluginInstancesLoader.instantiatePluginClasses(PluginInstancesLoader.java:145)
	at org.sonarsource.sonarlint.core.plugin.PluginInstancesLoader.load(PluginInstancesLoader.java:75)
	at org.sonarsource.sonarlint.core.plugin.PluginRepository.start(PluginRepository.java:57)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at org.sonarsource.sonarlint.shaded.org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110)
	at org.sonarsource.sonarlint.shaded.org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89)
	at org.sonarsource.sonarlint.core.container.ComponentContainer$1.start(ComponentContainer.java:272)
	at org.sonarsource.sonarlint.shaded.org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
	at org.sonarsource.sonarlint.shaded.org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
	at org.sonarsource.sonarlint.shaded.org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
	at org.sonarsource.sonarlint.shaded.org.picocontainer.behaviors.Stored.start(Stored.java:110)
	at org.sonarsource.sonarlint.shaded.org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
	at org.sonarsource.sonarlint.shaded.org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
	at org.sonarsource.sonarlint.shaded.org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
	at org.sonarsource.sonarlint.core.container.ComponentContainer.startComponents(ComponentContainer.java:125)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.start(ConnectedSonarLintEngineImpl.java:131)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.lambda$update$3(ConnectedSonarLintEngineImpl.java:184)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl$$Lambda$149.00000000104546A0.get(Unknown Source)
	at org.sonarsource.sonarlint.core.AbstractSonarLintEngine.withRwLock(AbstractSonarLintEngine.java:109)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.update(ConnectedSonarLintEngineImpl.java:177)
	at org.sonarlint.eclipse.core.internal.engine.connected.ConnectedEngineFacade.lambda$17(ConnectedEngineFacade.java:418)
	at org.sonarlint.eclipse.core.internal.engine.connected.ConnectedEngineFacade$$Lambda$148.0000000025FBE1A0.accept(Unknown Source)
	at org.sonarlint.eclipse.core.internal.engine.connected.ConnectedEngineFacade.doWithEngine(ConnectedEngineFacade.java:195)
	at org.sonarlint.eclipse.core.internal.engine.connected.ConnectedEngineFacade.updateStorage(ConnectedEngineFacade.java:417)
	at org.sonarlint.eclipse.core.internal.jobs.ServerUpdateJob.run(ServerUpdateJob.java:50)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=org/sonar/plugins/iac/IacPlugin, offset=6
	at java.lang.ClassLoader.defineClassImpl(Native Method)
	at java.lang.ClassLoader.defineClassInternal(ClassLoader.java:391)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:360)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:154)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:730)
	at java.net.URLClassLoader.access$400(URLClassLoader.java:96)
	at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:1187)
	at java.security.AccessController.doPrivileged(AccessController.java:739)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:605)
	at org.sonar.classloader.ClassRealm.loadClassFromSelf(ClassRealm.java:125)
	at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:37)
	at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:87)
	at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:76)
	at org.sonarsource.sonarlint.core.plugin.PluginInstancesLoader.instantiatePluginClasses(PluginInstancesLoader.java:143)
	... 28 more

Hey there.

The latest version of SonarLint is v8.0 and all earlier versions are unsupported. Can you upgrade to the latest version of SonarLint?

This will also imply that you run your IDE with at least Java 11.

Hi @Colin,

Unfortunately an IDE upgrade is not possible due to being a commercial product with many legacy plugins provided by the vendor.

The documentation implies that SonarLint v6.x should be used for Eclipse products (eg Neon) still running on Java 1.8 from this Requirements - Eclipse

Unfortunately that doesn’t mean that old versions of SonarLint will keep compatability with newer versions of SonarQube.