java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=org/sonar/api/utils/SonarException, offset=6

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 Stack Overflow by Phil
, 1 year ago
JVMCFRE003 bad major version; class=org/sonar/api/utils/SonarException, offset=6
via GitHub by foxyhearts
, 1 year ago
via GitHub by foxyhearts
, 2 years ago
(org/stringtemplate/v4/STGroup) bad major version at offset=6
via flexjson by charliehubbard
, 1 year ago
(flexjson/JSONSerializer) bad major version at offset=6
via nabble.com by Unknown author, 2 years ago
(org/postgresql/Driver) bad major version at offset=6
via Coderanch by murali jackson, 8 months ago
(com/microsoft/sqlserver/jdbc/SQLServerDriver) bad major version at offset=6
java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=org/sonar/api/utils/SonarException, offset=6
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:324)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:155)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:712)
at java.net.URLClassLoader.access$400(URLClassLoader.java:93)
at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:1164)
at java.security.AccessController.doPrivileged(AccessController.java:492)
at java.net.URLClassLoader.findClass(URLClassLoader.java:595)
at java.lang.ClassLoader.loadClass(ClassLoader.java:731)
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:94)
at java.lang.J9VMInternals.prepare(J9VMInternals.java:514)
at java.lang.Class.getMethod(Class.java:1116)
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:85)
at java.security.AccessController.doPrivileged(AccessController.java:400)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.ant.SonarTask.launchAnalysis(SonarTask.java:53)
at org.sonar.ant.SonarTask.execute(SonarTask.java:48)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:155)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
at org.apache.tools.ant.Main.runBuild(Main.java:854)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:285)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago

Write tip

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