Sonarlint to Intellij is crashing when using new Intellij IDEA Ultime + JBR 11

sonarlint

(Denis Cabasson) #1

When downloading the latest version of Intellij offered by the EAP (Early Access Program) from Jetbrains, it fails to start because of an issue with Sonarlint plugin.

Plugin 'org.sonarlint.idea' failed to initialize and will be disabled.  Please restart IntelliJ IDEA.

java.lang.ExceptionInInitializerError
    at org.sonarsource.sonarlint.shaded.com.google.gson.internal.reflect.ReflectionAccessor.<clinit>(ReflectionAccessor.java:36)
    at org.sonarsource.sonarlint.shaded.com.google.gson.internal.ConstructorConstructor.<init>(ConstructorConstructor.java:51)
    at org.sonarsource.sonarlint.shaded.com.google.gson.Gson.<init>(Gson.java:205)
    at org.sonarsource.sonarlint.shaded.com.google.gson.GsonBuilder.create(GsonBuilder.java:597)
    at org.sonarsource.sonarlint.core.telemetry.TelemetryStorage.createGson(TelemetryStorage.java:67)
    at org.sonarsource.sonarlint.core.telemetry.TelemetryStorage.load(TelemetryStorage.java:71)
    at org.sonarsource.sonarlint.core.telemetry.TelemetryStorage.tryLoad(TelemetryStorage.java:83)
    at org.sonarsource.sonarlint.core.telemetry.TelemetryManager.<init>(TelemetryManager.java:48)
    at org.sonarlint.intellij.telemetry.TelemetryManagerProvider.get(TelemetryManagerProvider.java:57)
    at org.sonarlint.intellij.telemetry.SonarLintTelemetryImpl.<init>(SonarLintTelemetryImpl.java:48)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
    at org.picocontainer.defaults.InstantiatingComponentAdapter.newInstance(InstantiatingComponentAdapter.java:193)
    at com.intellij.util.pico.CachingConstructorInjectionComponentAdapter.doGetComponentInstance(CachingConstructorInjectionComponentAdapter.java:92)
    at com.intellij.util.pico.CachingConstructorInjectionComponentAdapter.instantiateGuarded(CachingConstructorInjectionComponentAdapter.java:66)
    at com.intellij.util.pico.CachingConstructorInjectionComponentAdapter.getComponentInstance(CachingConstructorInjectionComponentAdapter.java:48)
    at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:462)
    at com.intellij.openapi.components.impl.ComponentManagerImpl.createComponents(ComponentManagerImpl.java:104)
    at com.intellij.openapi.application.impl.ApplicationImpl.lambda$createComponents$9(ApplicationImpl.java:449)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:164)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:586)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:86)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:151)
    at com.intellij.openapi.application.impl.ApplicationImpl.createComponents(ApplicationImpl.java:473)
    at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:88)
    at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:407)
    at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:393)
    at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:208)
    at com.intellij.idea.IdeaApplication.lambda$initApplication$0(IdeaApplication.java:74)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:322)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: java.lang.NumberFormatException: For input string: "11-internal"
    at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    at java.base/java.lang.Integer.parseInt(Integer.java:652)
    at java.base/java.lang.Integer.parseInt(Integer.java:770)
    at org.sonarsource.sonarlint.shaded.com.google.gson.util.VersionUtils.determineMajorJavaVersion(VersionUtils.java:28)
    at org.sonarsource.sonarlint.shaded.com.google.gson.util.VersionUtils.<clinit>(VersionUtils.java:24)
    ... 46 more

This is using the latest version of Sonarlint for Intellij plugin v4.0.2.3009 and EAP version of Intellij:

IntelliJ IDEA 2019.1 Snapshot (Ultimate Edition)
Build #IU-191.5109.14, built on February 6, 2019
IntelliJ IDEA EAP User
Expiration date: March 8, 2019
JRE: 11-internal+96 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.3

It looks like the parsing of the version for the JVM needs to be enhanced to support that format of version.