java.lang.UnsupportedClassVersionError

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
tip

Update "latest" to Java 8 on DockerHub.

tip

This might be caused by and outdated version of Java, SonarQube now uses Java 8 as default. You might upgrade java or use an older version of SonarQube.

tip

You're using an older version of java with classes compiled for java7

tip

If you're using intellij plugin of sonarqube, you might have to set the JAVA_HOME ambient variable manually.

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • GitHub comment 58#242650114
    via GitHub by tfinez
    ,
  • Exceptions when starting JDG on java 6
    via by Jakub Markos,
  • Support for JDK 1.7
    via GitHub by Emmerson-Miranda
    ,
  • How to get JavaFX to work?
    via by Unknown author,
  • General Help / MyCollab
    via by Unknown author,
    • java.lang.UnsupportedClassVersionError: org/jetbrains/annotations/Nullable : Unsupported major.minor version 52.0 at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:262)[spring-context-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:242)[spring-context-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.context.annotation.ComponentScanBeanDefinitionParser.parse(ComponentScanBeanDefinitionParser.java:84)[spring-context-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)[spring-beans-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1423)[spring-beans-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1413)[spring-beans-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:184)[spring-beans-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:140)[spring-beans-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:111)[spring-beans-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)[spring-beans-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)[spring-beans-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)[spring-beans-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)[spring-beans-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:255)[spring-beans-3.1.4.RELEASE.jar:3.1.4.RELEASE] Caused by: java.lang.UnsupportedClassVersionError: org/jetbrains/annotations/Nullable : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method)[rt.jar:1.7.0_79] at java.lang.ClassLoader.defineClass(ClassLoader.java:800)[rt.jar:1.7.0_79] at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:361)[jboss-modules.jar:1.3.6.Final-redhat-1] at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:482)[jboss-modules.jar:1.3.6.Final-redhat-1] at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:277)[jboss-modules.jar:1.3.6.Final-redhat-1] at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:92)[jboss-modules.jar:1.3.6.Final-redhat-1] at org.jboss.modules.Module.loadModuleClass(Module.java:568)[jboss-modules.jar:1.3.6.Final-redhat-1] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:205)[jboss-modules.jar:1.3.6.Final-redhat-1] at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459)[jboss-modules.jar:1.3.6.Final-redhat-1] at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408)[jboss-modules.jar:1.3.6.Final-redhat-1] at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389)[jboss-modules.jar:1.3.6.Final-redhat-1] at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134)[jboss-modules.jar:1.3.6.Final-redhat-1] at org.springframework.core.type.classreading.RecursiveAnnotationAttributesVisitor.visitEnd(AnnotationAttributesReadingVisitor.java:163)[spring-core-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.asm.ClassReader.a(Unknown Source)[spring-asm-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.asm.ClassReader.accept(Unknown Source)[spring-asm-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.asm.ClassReader.accept(Unknown Source)[spring-asm-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:59)[spring-core-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:80)[spring-core-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:101)[spring-core-3.1.4.RELEASE.jar:3.1.4.RELEASE]

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    193 more bugmates