Tag Archives: sonarlint

IDEA uses sonarlint error [How to Solve]

The following errors may occur when using sonarlint in idea:

 

 1 Plugin 'org.sonarlint.idea' failed to initialize and will be disabled.  Please restart IntelliJ IDEA.
 2 com.intellij.diagnostic.PluginException: org/sonarlint/intellij/config/global/SonarLintGlobalSettings : Unsupported major.minor version 52.0 [Plugin: org.sonarlint.idea]
 3     at com.intellij.ide.plugins.cl.PluginClassLoader.b(PluginClassLoader.java:130)
 4     at com.intellij.ide.plugins.cl.PluginClassLoader.a(PluginClassLoader.java:77)
 5     at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:66)
 6     at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
 7     at java.lang.Class.forName0(Native Method)
 8     at java.lang.Class.forName(Class.java:249)
 9     at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.a(ComponentManagerImpl.java:427)
10     at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.a(ComponentManagerImpl.java:417)
11     at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.access$000(ComponentManagerImpl.java:403)
12     at com.intellij.openapi.components.impl.ComponentManagerImpl.a(ComponentManagerImpl.java:108)
13     at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:87)
14     at com.intellij.openapi.components.impl.stores.ApplicationStoreImpl.load(ApplicationStoreImpl.java:101)
15     at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:499)
16     at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:481)
17     at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:170)
18     at com.intellij.idea.MainImpl$1$1$1.run(MainImpl.java:62)
19     at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
20     at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
21     at java.awt.EventQueue.access$400(EventQueue.java:82)
22     at java.awt.EventQueue$2.run(EventQueue.java:676)
23     at java.awt.EventQueue$2.run(EventQueue.java:674)
24     at java.security.AccessController.doPrivileged(Native Method)
25     at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
26     at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
27     at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:362)
28     at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
29     at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
30     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
31     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
32     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
33     at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
34 Caused by: java.lang.UnsupportedClassVersionError: org/sonarlint/intellij/config/global/SonarLintGlobalSettings : Unsupported major.minor version 52.0
35     at java.lang.ClassLoader.defineClass1(Native Method)
36     at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
37     at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
38     at java.lang.ClassLoader.defineClass(ClassLoader.java:471)
39     at com.intellij.util.lang.UrlClassLoader._defineClass(UrlClassLoader.java:259)
40     at com.intellij.util.lang.UrlClassLoader.defineClass(UrlClassLoader.java:255)
41     at com.intellij.util.lang.UrlClassLoader._findClass(UrlClassLoader.java:231)
42     at com.intellij.ide.plugins.cl.PluginClassLoader.b(PluginClassLoader.java:124)
43     ... 30 more

 

Reason:

The jdk boot version used by idea is too low, need to upgrade jdk boot

How to check the idea jdk version:

IntelijIdea->abount IntelijIdea to see it.

My solution:

Just install the new version of idea, the default jdk version is 1.8.*. sonrlint works fine.