java.lang.UnsupportedClassVersionError: Bad version number in .class file

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert 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.

,
Expert tip

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

Solutions on the web

via Visual-paradigm by Anonymous, 1 year ago
Bad version number in .class file
via Stack Overflow by alex
, 2 years ago
Bad version number in .class file
via Stack Overflow by user1446192
, 2 years ago
Bad version number in .class file
via Google Groups by zab, 3 months ago
Bad version number in .class file
java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
at java.lang.Class.privateGetPublicMethods(Class.java:2519)
at java.lang.Class.getMethods(Class.java:1406)
at hudson.ExtensionFinder$AbstractGuiceFinder$SezpozModule.resolve(ExtensionFinder.java:293)
at com.google.inject.AbstractModule.configure(AbstractModule.java:59)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
at com.google.inject.spi.Elements.getElements(Elements.java:101)
at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:133)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
at com.google.inject.Guice.createInjector(Guice.java:95)
at hudson.ExtensionFinder$AbstractGuiceFinder.(ExtensionFinder.java:180)
at hudson.ExtensionFinder$GuiceFinder.(ExtensionFinder.java:149)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at net.java.sezpoz.IndexItem.instance(IndexItem.java:181)
at hudson.ExtensionFinder$Sezpoz.find(ExtensionFinder.java:401)
at hudson.ExtensionFinder._find(ExtensionFinder.java:110)
at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:289)
at hudson.ExtensionList.load(ExtensionList.java:258)
at hudson.ExtensionList.ensureLoaded(ExtensionList.java:229)
at hudson.ExtensionList.iterator(ExtensionList.java:136)
at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:282)
at hudson.ExtensionList.load(ExtensionList.java:258)
at hudson.ExtensionList.ensureLoaded(ExtensionList.java:229)
at hudson.ExtensionList.getComponents(ExtensionList.java:147)
at hudson.DescriptorExtensionList.load(DescriptorExtensionList.java:181)
at hudson.ExtensionList.ensureLoaded(ExtensionList.java:229)
at hudson.ExtensionList.iterator(ExtensionList.java:136)
at org.jenkinsci.plugins.xunit.AliasInitializer.addAliases(AliasInitializer.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at hudson.init.InitializerFinder.invoke(InitializerFinder.java:114)
at hudson.init.InitializerFinder$TaskImpl.run(InitializerFinder.java:178)
at jenkins.model.Jenkins$5.runTask(Jenkins.java:798)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 2 years ago
Samebug visitor profile picture
Unknown user
Once, 2 days ago
Once, 6 days ago
Samebug visitor profile picture
Unknown user
Once, 1 week ago
Once, 2 weeks ago
338 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.