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

Jenkins JIRA | Ivar Kanters | 5 years ago
  1. 0

    Since the upgrade to 1.456 a job for java 1.5.0_22 fails with a strange error. (see below) Because it reports an {{UnsupportedClassVersionError}} I assumed it has something to do with the wrong java version, but for weeks it has build successful and no code changes have been done. The job does a fresh checkout and the maven goal is {{clean install}}... I've attached the jobs' config.xml. {code} [workspace] $ /opt/jdks/jdk1.5.0_22/bin/java -client -Xmn256m -Xms512m -Xmx1280m -XX:PermSize=128m -XX:MaxPermSize=512m -XX:SurvivorRatio=6 -XX:MaxTenuringThreshold=8 -XX:+UseConcMarkSweepGC -XX:+UseBiasedLocking -XX:+AggressiveOpts -Dm3plugin.lib=/opt/jenkins/plugins/artifactory/WEB-INF/lib -cp /opt/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-agent-1.2.jar:/opt/jenkins/tools/maven-3-latest/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /opt/jenkins/tools/maven-3-latest /opt/jenkins/war/WEB-INF/lib/remoting-2.12.jar /opt/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-1.2.jar 44408 <===[JENKINS REMOTING CAPACITY]===>channel started Executing Maven: -B -f /opt/jenkins/jobs/xxxxxxxxxxx/workspace/pom.xml clean install Mar 22, 2012 2:46:42 AM org.sonatype.guice.bean.reflect.NamedClass WARNING: Error injecting: org.jfrog.build.extractor.maven.BuildInfoRecorderLifecycleParticipant java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) 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 org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:386) at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357) at java.lang.Class.getDeclaredConstructors(Class.java:1808) at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:243) at com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:96) at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:628) at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:835) at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:769) at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:254) at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:205) at com.google.inject.internal.InjectorImpl.getInternalFactory(InjectorImpl.java:843) at com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:957) at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:990) at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:951) at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1003) at org.sonatype.guice.bean.reflect.AbstractDeferredClass.get(AbstractDeferredClass.java:47) at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40) at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1021) at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) at com.google.inject.Scopes$1$1.get(Scopes.java:59) at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40) at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:968) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1014) at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:964) at org.sonatype.guice.bean.locators.LazyBeanEntry.getValue(LazyBeanEntry.java:79) at org.sonatype.guice.plexus.locators.LazyPlexusBean.getValue(LazyPlexusBean.java:53) at org.sonatype.guice.bean.locators.EntryListAdapter$ValueIterator.next(EntryListAdapter.java:112) at java.util.AbstractCollection.addAll(AbstractCollection.java:318) at org.apache.maven.DefaultMaven.getLifecycleParticipants(DefaultMaven.java:514) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:214) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79) 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:592) at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239) at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158) at hudson.maven.Maven3Builder.call(Maven3Builder.java:104) at hudson.maven.Maven3Builder.call(Maven3Builder.java:70) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:287) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269) at java.util.concurrent.FutureTask.run(FutureTask.java:123) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676) at java.lang.Thread.run(Thread.java:595) mavenExecutionResult exceptions not empty message : Internal error: com.google.inject.ProvisionException: Guice provision errors: 1) Error injecting: org.jfrog.build.extractor.maven.BuildInfoRecorderLifecycleParticipant at ClassRealm[plexus.core, parent: null] at ClassRealm[plexus.core, parent: null] while locating org.apache.maven.AbstractMavenLifecycleParticipant 1 error cause : Guice provision errors: 1) Error injecting: org.jfrog.build.extractor.maven.BuildInfoRecorderLifecycleParticipant at ClassRealm[plexus.core, parent: null] at ClassRealm[plexus.core, parent: null] while locating org.apache.maven.AbstractMavenLifecycleParticipant 1 error Stack trace : org.apache.maven.InternalErrorException: Internal error: com.google.inject.ProvisionException: Guice provision errors: 1) Error injecting: org.jfrog.build.extractor.maven.BuildInfoRecorderLifecycleParticipant at ClassRealm[plexus.core, parent: null] at ClassRealm[plexus.core, parent: null] while locating org.apache.maven.AbstractMavenLifecycleParticipant 1 error at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168) at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79) 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:592) at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239) at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158) at hudson.maven.Maven3Builder.call(Maven3Builder.java:104) at hudson.maven.Maven3Builder.call(Maven3Builder.java:70) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:287) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269) at java.util.concurrent.FutureTask.run(FutureTask.java:123) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676) at java.lang.Thread.run(Thread.java:595) Caused by: com.google.inject.ProvisionException: Guice provision errors: 1) Error injecting: org.jfrog.build.extractor.maven.BuildInfoRecorderLifecycleParticipant at ClassRealm[plexus.core, parent: null] at ClassRealm[plexus.core, parent: null] while locating org.apache.maven.AbstractMavenLifecycleParticipant 1 error at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:977) at org.sonatype.guice.bean.locators.LazyBeanEntry.getValue(LazyBeanEntry.java:79) at org.sonatype.guice.plexus.locators.LazyPlexusBean.getValue(LazyPlexusBean.java:53) at org.sonatype.guice.bean.locators.EntryListAdapter$ValueIterator.next(EntryListAdapter.java:112) at java.util.AbstractCollection.addAll(AbstractCollection.java:318) at org.apache.maven.DefaultMaven.getLifecycleParticipants(DefaultMaven.java:514) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:214) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) ... 19 more Caused by: java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) 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 org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:386) at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357) at java.lang.Class.getDeclaredConstructors(Class.java:1808) at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:243) at com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:96) at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:628) at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:835) at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:769) at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:254) at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:205) at com.google.inject.internal.InjectorImpl.getInternalFactory(InjectorImpl.java:843) at com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:957) at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:990) at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:951) at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1003) at org.sonatype.guice.bean.reflect.AbstractDeferredClass.get(AbstractDeferredClass.java:47) at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40) at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1021) at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) at com.google.inject.Scopes$1$1.get(Scopes.java:59) at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40) at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:968) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1014) at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:964) ... 26 more channel stopped Finished: FAILURE {code}

    Jenkins JIRA | 5 years ago | Ivar Kanters
    java.lang.UnsupportedClassVersionError: Bad version number in .class file
  2. 0

    Since the upgrade to 1.456 a job for java 1.5.0_22 fails with a strange error. (see below) Because it reports an {{UnsupportedClassVersionError}} I assumed it has something to do with the wrong java version, but for weeks it has build successful and no code changes have been done. The job does a fresh checkout and the maven goal is {{clean install}}... I've attached the jobs' config.xml. {code} [workspace] $ /opt/jdks/jdk1.5.0_22/bin/java -client -Xmn256m -Xms512m -Xmx1280m -XX:PermSize=128m -XX:MaxPermSize=512m -XX:SurvivorRatio=6 -XX:MaxTenuringThreshold=8 -XX:+UseConcMarkSweepGC -XX:+UseBiasedLocking -XX:+AggressiveOpts -Dm3plugin.lib=/opt/jenkins/plugins/artifactory/WEB-INF/lib -cp /opt/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-agent-1.2.jar:/opt/jenkins/tools/maven-3-latest/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /opt/jenkins/tools/maven-3-latest /opt/jenkins/war/WEB-INF/lib/remoting-2.12.jar /opt/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-1.2.jar 44408 <===[JENKINS REMOTING CAPACITY]===>channel started Executing Maven: -B -f /opt/jenkins/jobs/xxxxxxxxxxx/workspace/pom.xml clean install Mar 22, 2012 2:46:42 AM org.sonatype.guice.bean.reflect.NamedClass WARNING: Error injecting: org.jfrog.build.extractor.maven.BuildInfoRecorderLifecycleParticipant java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) 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 org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:386) at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357) at java.lang.Class.getDeclaredConstructors(Class.java:1808) at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:243) at com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:96) at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:628) at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:835) at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:769) at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:254) at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:205) at com.google.inject.internal.InjectorImpl.getInternalFactory(InjectorImpl.java:843) at com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:957) at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:990) at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:951) at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1003) at org.sonatype.guice.bean.reflect.AbstractDeferredClass.get(AbstractDeferredClass.java:47) at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40) at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1021) at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) at com.google.inject.Scopes$1$1.get(Scopes.java:59) at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40) at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:968) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1014) at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:964) at org.sonatype.guice.bean.locators.LazyBeanEntry.getValue(LazyBeanEntry.java:79) at org.sonatype.guice.plexus.locators.LazyPlexusBean.getValue(LazyPlexusBean.java:53) at org.sonatype.guice.bean.locators.EntryListAdapter$ValueIterator.next(EntryListAdapter.java:112) at java.util.AbstractCollection.addAll(AbstractCollection.java:318) at org.apache.maven.DefaultMaven.getLifecycleParticipants(DefaultMaven.java:514) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:214) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79) 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:592) at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239) at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158) at hudson.maven.Maven3Builder.call(Maven3Builder.java:104) at hudson.maven.Maven3Builder.call(Maven3Builder.java:70) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:287) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269) at java.util.concurrent.FutureTask.run(FutureTask.java:123) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676) at java.lang.Thread.run(Thread.java:595) mavenExecutionResult exceptions not empty message : Internal error: com.google.inject.ProvisionException: Guice provision errors: 1) Error injecting: org.jfrog.build.extractor.maven.BuildInfoRecorderLifecycleParticipant at ClassRealm[plexus.core, parent: null] at ClassRealm[plexus.core, parent: null] while locating org.apache.maven.AbstractMavenLifecycleParticipant 1 error cause : Guice provision errors: 1) Error injecting: org.jfrog.build.extractor.maven.BuildInfoRecorderLifecycleParticipant at ClassRealm[plexus.core, parent: null] at ClassRealm[plexus.core, parent: null] while locating org.apache.maven.AbstractMavenLifecycleParticipant 1 error Stack trace : org.apache.maven.InternalErrorException: Internal error: com.google.inject.ProvisionException: Guice provision errors: 1) Error injecting: org.jfrog.build.extractor.maven.BuildInfoRecorderLifecycleParticipant at ClassRealm[plexus.core, parent: null] at ClassRealm[plexus.core, parent: null] while locating org.apache.maven.AbstractMavenLifecycleParticipant 1 error at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168) at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79) 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:592) at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239) at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158) at hudson.maven.Maven3Builder.call(Maven3Builder.java:104) at hudson.maven.Maven3Builder.call(Maven3Builder.java:70) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:287) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269) at java.util.concurrent.FutureTask.run(FutureTask.java:123) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676) at java.lang.Thread.run(Thread.java:595) Caused by: com.google.inject.ProvisionException: Guice provision errors: 1) Error injecting: org.jfrog.build.extractor.maven.BuildInfoRecorderLifecycleParticipant at ClassRealm[plexus.core, parent: null] at ClassRealm[plexus.core, parent: null] while locating org.apache.maven.AbstractMavenLifecycleParticipant 1 error at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:977) at org.sonatype.guice.bean.locators.LazyBeanEntry.getValue(LazyBeanEntry.java:79) at org.sonatype.guice.plexus.locators.LazyPlexusBean.getValue(LazyPlexusBean.java:53) at org.sonatype.guice.bean.locators.EntryListAdapter$ValueIterator.next(EntryListAdapter.java:112) at java.util.AbstractCollection.addAll(AbstractCollection.java:318) at org.apache.maven.DefaultMaven.getLifecycleParticipants(DefaultMaven.java:514) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:214) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) ... 19 more Caused by: java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) 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 org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:386) at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244) at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357) at java.lang.Class.getDeclaredConstructors(Class.java:1808) at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:243) at com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:96) at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:628) at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:835) at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:769) at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:254) at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:205) at com.google.inject.internal.InjectorImpl.getInternalFactory(InjectorImpl.java:843) at com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:957) at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:990) at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:951) at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1003) at org.sonatype.guice.bean.reflect.AbstractDeferredClass.get(AbstractDeferredClass.java:47) at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40) at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1021) at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) at com.google.inject.Scopes$1$1.get(Scopes.java:59) at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40) at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:968) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1014) at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:964) ... 26 more channel stopped Finished: FAILURE {code}

    Jenkins JIRA | 5 years ago | Ivar Kanters
    java.lang.UnsupportedClassVersionError: Bad version number in .class file
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Bad version number in .class file after upgrading Sonar to 3.6

    Stack Overflow | 3 years ago | lweller
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project uno: Can not execute Sonar
  5. 0

    Error running Maven Project in Eclipse using jdk1.5

    Stack Overflow | 4 years ago | Tarek
    java.lang.UnsupportedClassVersionError: Bad version number in .class file

    34 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.UnsupportedClassVersionError

      Bad version number in .class file

      at java.lang.ClassLoader.defineClass1()
    2. Java RT
      URLClassLoader.findClass
      1. java.lang.ClassLoader.defineClass1(Native Method)
      2. java.lang.ClassLoader.defineClass(ClassLoader.java:621)
      3. java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
      4. java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
      5. java.net.URLClassLoader.access$100(URLClassLoader.java:56)
      6. java.net.URLClassLoader$1.run(URLClassLoader.java:195)
      7. java.security.AccessController.doPrivileged(Native Method)
      8. java.net.URLClassLoader.findClass(URLClassLoader.java:188)
      8 frames
    3. Plexus
      ClassRealm.loadClass
      1. org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:386)
      2. org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
      3. org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
      4. org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
      4 frames
    4. Java RT
      Class.getDeclaredConstructors
      1. java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
      2. java.lang.Class.getDeclaredConstructors0(Native Method)
      3. java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
      4. java.lang.Class.getDeclaredConstructors(Class.java:1808)
      4 frames
    5. Google Guice - Core Library
      InjectorImpl.getInstance
      1. com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:243)
      2. com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:96)
      3. com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:628)
      4. com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:835)
      5. com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:769)
      6. com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:254)
      7. com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:205)
      8. com.google.inject.internal.InjectorImpl.getInternalFactory(InjectorImpl.java:843)
      9. com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:957)
      10. com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:990)
      11. com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:951)
      12. com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1003)
      12 frames
    6. Sisu-Inject-Bean : legacy wrapper
      AbstractDeferredClass.get
      1. org.sonatype.guice.bean.reflect.AbstractDeferredClass.get(AbstractDeferredClass.java:47)
      1 frame
    7. Google Guice - Core Library
      InjectorImpl$4.get
      1. com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
      2. com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
      3. com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1021)
      4. com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
      5. com.google.inject.Scopes$1$1.get(Scopes.java:59)
      6. com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
      7. com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:968)
      8. com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1014)
      9. com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:964)
      9 frames
    8. Sisu-Inject-Bean : legacy wrapper
      LazyBeanEntry.getValue
      1. org.sonatype.guice.bean.locators.LazyBeanEntry.getValue(LazyBeanEntry.java:79)
      1 frame
    9. org.sonatype.guice
      LazyPlexusBean.getValue
      1. org.sonatype.guice.plexus.locators.LazyPlexusBean.getValue(LazyPlexusBean.java:53)
      1 frame
    10. Sisu-Inject-Bean : legacy wrapper
      EntryListAdapter$ValueIterator.next
      1. org.sonatype.guice.bean.locators.EntryListAdapter$ValueIterator.next(EntryListAdapter.java:112)
      1 frame
    11. Java RT
      AbstractCollection.addAll
      1. java.util.AbstractCollection.addAll(AbstractCollection.java:318)
      1 frame
    12. Maven Core
      DefaultMaven.execute
      1. org.apache.maven.DefaultMaven.getLifecycleParticipants(DefaultMaven.java:514)
      2. org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:214)
      3. org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      3 frames
    13. M3 Interceptor
      Maven3Launcher.main
      1. org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
      1 frame
    14. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:592)
      4 frames
    15. Plexus
      Launcher.launch
      1. org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
      2. org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
      2 frames
    16. M3 Agent
      Maven3Main.launch
      1. org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158)
      1 frame
    17. Hudson Maven Embedder
      Maven3Builder.call
      1. hudson.maven.Maven3Builder.call(Maven3Builder.java:104)
      2. hudson.maven.Maven3Builder.call(Maven3Builder.java:70)
      2 frames
    18. Hudson :: Remoting Layer
      InterceptingExecutorService$1.call
      1. hudson.remoting.UserRequest.perform(UserRequest.java:118)
      2. hudson.remoting.UserRequest.perform(UserRequest.java:48)
      3. hudson.remoting.Request$2.run(Request.java:287)
      4. hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      4 frames
    19. Java RT
      Thread.run
      1. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
      2. java.util.concurrent.FutureTask.run(FutureTask.java:123)
      3. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)
      4. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)
      5. java.lang.Thread.run(Thread.java:595)
      5 frames