Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-9916

Cannot launch maven builds with Java 5 if Jenkins is deployed on Tomcat 7

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • maven-plugin
    • None

      I have some maven jobs using Java 5 to build.
      I'm using a 1.416-SNAPSHOT (yes it's bad )
      These jobs are failing because of an incompatibility of java versions which wasn't the case few days before

      java.lang.reflect.InvocationTargetException
      	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:128)
      	at hudson.maven.Maven3Builder.call(Maven3Builder.java:75)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      	at hudson.remoting.Request$2.run(Request.java:270)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
      	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: 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.lang.ClassLoader.defineClass(ClassLoader.java:466)
      	at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:151)
      	at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:131)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
      	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
      	at hudson.FilePath.act(FilePath.java:758)
      	at hudson.FilePath.act(FilePath.java:740)
      	at hudson.FilePath.digest(FilePath.java:1331)
      	at hudson.maven.reporters.MavenFingerprinter.record(MavenFingerprinter.java:146)
      	at hudson.maven.reporters.MavenFingerprinter.postExecute(MavenFingerprinter.java:87)
      	at hudson.maven.Maven3Builder$MavenExecutionListener.reccordMojoSucceeded(Maven3Builder.java:599)
      	at hudson.maven.Maven3Builder$MavenExecutionListener.mojoSucceeded(Maven3Builder.java:562)
      	at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:87)
      	at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:228)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      	at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
      	... 18 more
      channel stopped
      ERROR: Failed to parse POMs
      hudson.util.IOException2: java.lang.reflect.InvocationTargetException
      	at hudson.maven.Maven3Builder.call(Maven3Builder.java:198)
      	at hudson.maven.Maven3Builder.call(Maven3Builder.java:75)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      	at hudson.remoting.Request$2.run(Request.java:270)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
      	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: java.lang.Exception: java.lang.reflect.InvocationTargetException
      	at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:161)
      	at hudson.maven.Maven3Builder.call(Maven3Builder.java:128)
      	... 10 more
      Caused by: java.lang.reflect.InvocationTargetException
      	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)
      	... 11 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.lang.ClassLoader.defineClass(ClassLoader.java:466)
      	at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:151)
      	at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:131)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
      	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
      	at hudson.FilePath.act(FilePath.java:758)
      	at hudson.FilePath.act(FilePath.java:740)
      	at hudson.FilePath.digest(FilePath.java:1331)
      	at hudson.maven.reporters.MavenFingerprinter.record(MavenFingerprinter.java:146)
      	at hudson.maven.reporters.MavenFingerprinter.postExecute(MavenFingerprinter.java:87)
      	at hudson.maven.Maven3Builder$MavenExecutionListener.reccordMojoSucceeded(Maven3Builder.java:599)
      	at hudson.maven.Maven3Builder$MavenExecutionListener.mojoSucceeded(Maven3Builder.java:562)
      	at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:87)
      	at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:228)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      	at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
      	... 18 more
      

      a full log

      Started by user aheritier
      Building on master
      Cleaning up /home/swfhudson/data/jobs/maven-exo-skin-ci/workspace/sources
      Deleting /home/swfhudson/data/jobs/maven-exo-skin-ci/workspace/sources/target
      Updating file:///home/swfsvn/data/repositories/projects/utils/maven/maven-exo-skin/trunk
      At revision 70286
      no change for file:///home/swfsvn/data/repositories/projects/utils/maven/maven-exo-skin/trunk since the previous build
      ERROR: Ignore Problem expanding maven opts macros org.jenkinsci.plugins.tokenmacro.TokenMacro
      Found mavenVersion 2.2.1 from file jar:file:/home/swfhudson/data/tools/maven-2.2.x/lib/maven-2.2.1-uber.jar!/META-INF/maven/org.apache.maven/maven-core/pom.properties
      No emails were triggered.
      Parsing POMs
      ERROR: Ignore Problem expanding maven opts macros org.jenkinsci.plugins.tokenmacro.TokenMacro
      [sources] $ /home/swf/vms/sun/jdk1.5.0-i586/bin/java -client -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -Xshare:auto -Xms1G -Xmx2G -XX:MaxPermSize=1G -Djava.net.preferIPv4Stack=true -Dcom.sun.media.jai.disableMediaLib=true -Djava.io.tmpdir=/home/swfhudson/tmp/ -Dmaven.artifact.threads=10 -cp /home/swfhudson/data/plugins/maven-plugin/WEB-INF/lib/maven-agent-1.2.jar:/home/swfhudson/data/tools/maven-2.2.x/boot/classworlds-1.1.jar hudson.maven.agent.Main /home/swfhudson/data/tools/maven-2.2.x /home/swfhudson/apache-tomcat-7.0.14/webapps/ROOT/WEB-INF/lib/remoting-1.416-SNAPSHOT.jar /home/swfhudson/data/plugins/maven-plugin/WEB-INF/lib/maven-interceptor-1.2.jar 38520 /home/swfhudson/data/plugins/maven-plugin/WEB-INF/lib/maven2.1-interceptor-1.2.jar
      <===[HUDSON REMOTING CAPACITY]===>channel started
      channel stopped
      ERROR: Failed to parse POMs
      java.io.IOException: Remote call on Channel to Maven [/home/swf/vms/sun/jdk1.5.0-i586/bin/java, -client, -XX:+UseConcMarkSweepGC, -XX:+CMSIncrementalMode, -Xshare:auto, -Xms1G, -Xmx2G, -XX:MaxPermSize=1G, -Djava.net.preferIPv4Stack=true, -Dcom.sun.media.jai.disableMediaLib=true, -Djava.io.tmpdir=/home/swfhudson/tmp/, -Dmaven.artifact.threads=10, -cp, /home/swfhudson/data/plugins/maven-plugin/WEB-INF/lib/maven-agent-1.2.jar:/home/swfhudson/data/tools/maven-2.2.x/boot/classworlds-1.1.jar, hudson.maven.agent.Main, /home/swfhudson/data/tools/maven-2.2.x, /home/swfhudson/apache-tomcat-7.0.14/webapps/ROOT/WEB-INF/lib/remoting-1.416-SNAPSHOT.jar, /home/swfhudson/data/plugins/maven-plugin/WEB-INF/lib/maven-interceptor-1.2.jar, 38520, /home/swfhudson/data/plugins/maven-plugin/WEB-INF/lib/maven2.1-interceptor-1.2.jar] failed
      	at hudson.remoting.Channel.call(Channel.java:676)
      	at hudson.maven.ProcessCache$MavenProcess.call(ProcessCache.java:156)
      	at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:743)
      	at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:429)
      	at hudson.model.Run.run(Run.java:1375)
      	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:467)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:145)
      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.lang.ClassLoader.defineClass(ClassLoader.java:466)
      	at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:151)
      	at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:131)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
      	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
      	at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:1001)
      	at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:935)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      	at hudson.remoting.Request$2.run(Request.java:270)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
      	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)
      Archiving artifacts
      ERROR: Ignore Problem expanding maven opts macros org.jenkinsci.plugins.tokenmacro.TokenMacro
      Email was triggered for: Failure
      Sending email for trigger: Failure
      ERROR: Ignore Problem expanding maven opts macros org.jenkinsci.plugins.tokenmacro.TokenMacro
      Sending email to: exo-swf-notifications@exoplatform.com
      Finished: FAILURE
      

            Unassigned Unassigned
            aheritier Arnaud Héritier
            Votes:
            5 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: