Bienvenue, Invité
Nom d'utilisateur : Mot de passe : Se souvenir de moi

SUJET : Build de projet impossible avec Jenkins

Build de projet impossible avec Jenkins il y a 1 an 5 mois #6277

  • Anthony
  • Portrait de Anthony
  • Hors Ligne
  • Fresh Boarder
  • Messages : 2
Bonjour,

Actuellement, j'ai un projet squash TA avec script Selenium créé avec Eclipse comme décrit dans le wiki.
Lorsque je build mon projet à partir d'Eclipse, tous va bien, le test se lance entièrement sans problème.
J'ai ensuite installé Squash TA server avec Jenkins, j'ai ajouté mon projet à Jenkins et lorsque je lance le build dans Jenkins avec le bouton "build now", le log m'indique que le JDK7 ne supporte pas l’exécution d’un projet Maven voici le log :

Building in workspace C:\Users\mnh1\.jenkins\jobs\testFolder\jobs\firstTest\workspace
Parsing POMs
Established TCP socket on 58689
[my.myTestProject] $ "C:\Program Files\Java\jdk1.7.0_80/bin/java" -cp "C:\Users\mnh1\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven3-agent-1.11.jar;C:\Program Files\apache-maven-3.0.4\boot\plexus-classworlds-2.4.jar" org.jvnet.hudson.maven3.agent.Maven3Main "C:\Program Files\apache-maven-3.0.4" C:\Users\mnh1\.jenkins\war\WEB-INF\lib\remoting-3.12.jar C:\Users\mnh1\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-1.11.jar C:\Users\mnh1\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-commons-1.11.jar 58689
Exception in thread "main" java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
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 org.jvnet.hudson.maven3.agent.Maven3Main.main(Maven3Main.java:138)
at org.jvnet.hudson.maven3.agent.Maven3Main.main(Maven3Main.java:70)
ERROR: ================================================================================
ERROR: Invalid project setup: Connection reset
ERROR: [JENKINS-18403][JENKINS-28294] JDK 'jdk7' not supported to run Maven projects.
ERROR: Maven projects have to be launched with a Java version greater or equal to the minimum version required by the master.
ERROR: Use the Maven JDK Toolchains (plugin) to build your maven project with an older JDK.
ERROR: Retrying with slave Java and setting compile/test properties to point to C:\Program Files\Java\jdk1.7.0_80.
ERROR: ================================================================================
Established TCP socket on 58692
[my.myTestProject] $ "C:\Program Files\Java\jdk1.8.0_144\jre/bin/java" -cp "C:\Users\mnh1\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven3-agent-1.11.jar;C:\Program Files\apache-maven-3.0.4\boot\plexus-classworlds-2.4.jar" org.jvnet.hudson.maven3.agent.Maven3Main "C:\Program Files\apache-maven-3.0.4" C:\Users\mnh1\.jenkins\war\WEB-INF\lib\remoting-3.12.jar C:\Users\mnh1\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-1.11.jar C:\Users\mnh1\.jenkins\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-commons-1.11.jar 58692
<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven: -B -f C:\Users\mnh1\Desktop\Util\programmes\workspace_SquashTA\my.myTestProject\pom.xml squash-ta:run
[INFO] Scanning for projects...
[INFO]
[INFO]
[INFO] Building my.myTestProject 1.0
[INFO]
[INFO]
[INFO] --- squash-ta-maven-plugin:1.9.0-RELEASE:run (default-cli) @ my.myTestProject ---
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
[WARNING] Per maven bug #MNG5787, re-adding filtered artifact URL: file:/C:/Users/mnh1/.m2/repository/javax/inject/javax.inject/1/javax.inject-1.jar
[WARNING] Applied Maven 3.3.x fix
[INFO] Squash TA : compiling tests...
[INFO] Squash TA : initializing context...
[INFO] Loading XML bean definitions from Byte array resource [Computed squashTA engine configuration]
[INFO] Refreshing org.springframework.context.support.GenericXmlApplicationContext@494e894d: startup date [Tue Sep 26 16:16:36 CEST 2017]; root of context hierarchy
[INFO] JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
[INFO] Squash TA : testing...
16:16:38.427 [pool-1-thread-1 for channel id=53] ERROR org.squashtest.ta.plugin.commons.converter.FileToJavaCodeBundle - It must have java sources in a java subdirectory in resources directory
16:16:38.428 [pool-1-thread-1 for channel id=53] ERROR org.squashtest.ta.backbone.tools.ReflectionUtils - Test Automation Engine error (non SUT) : method 'convert' from engine component of class 'org.squashtest.ta.plugin.commons.converter.FileToJavaCodeBundle' with argument 'org.squashtest.ta.framework.components.FileResource' has thrown an exception.
org.squashtest.ta.framework.exception.BadDataException: Java code compilation failed:

at org.squashtest.ta.plugin.commons.converter.FileToJavaCodeBundle.convert(FileToJavaCodeBundle.java:111) ~[squash-ta-plugin-commons-components-1.9.0-RELEASE.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_144]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_144]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_144]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_144]
at org.squashtest.ta.backbone.tools.ReflectionUtils.invoke(ReflectionUtils.java:252) [squash-ta-engine-1.9.0-RELEASE.jar:?]
at org.squashtest.ta.backbone.engine.wrapper.ResourceConverterHandler.convert(ResourceConverterHandler.java:106) [squash-ta-engine-1.9.0-RELEASE.jar:?]
at org.squashtest.ta.backbone.engine.instructionrunner.DefaultConvertResourceRunner.applyConverter(DefaultConvertResourceRunner.java:130) [squash-ta-engine-1.9.0-RELEASE.jar:?]
at org.squashtest.ta.backbone.engine.instructionrunner.DefaultConvertResourceRunner.convertResource(DefaultConvertResourceRunner.java:94) [squash-ta-engine-1.9.0-RELEASE.jar:?]
at org.squashtest.ta.backbone.engine.instructionrunner.DefaultConvertResourceRunner.doRun(DefaultConvertResourceRunner.java:54) [squash-ta-engine-1.9.0-RELEASE.jar:?]
at org.squashtest.ta.backbone.engine.instructionrunner.AbstractDefaultInstructionRunner.run(AbstractDefaultInstructionRunner.java:69) [squash-ta-engine-1.9.0-RELEASE.jar:?]
at org.squashtest.ta.backbone.engine.impl.TestRunnerImpl.runInstruction(TestRunnerImpl.java:203) [squash-ta-engine-1.9.0-RELEASE.jar:?]
at org.squashtest.ta.backbone.engine.impl.TestRunnerImpl.runInstructionList(TestRunnerImpl.java:148) [squash-ta-engine-1.9.0-RELEASE.jar:?]
at org.squashtest.ta.backbone.engine.impl.TestRunnerImpl.runMetaInstruction(TestRunnerImpl.java:172) [squash-ta-engine-1.9.0-RELEASE.jar:?]
at org.squashtest.ta.backbone.engine.impl.TestRunnerImpl.runInstructionList(TestRunnerImpl.java:146) [squash-ta-engine-1.9.0-RELEASE.jar:?]
at org.squashtest.ta.backbone.engine.impl.TestRunnerImpl.runPhase(TestRunnerImpl.java:136) [squash-ta-engine-1.9.0-RELEASE.jar:?]
at org.squashtest.ta.backbone.engine.impl.TestRunnerImpl.runTest(TestRunnerImpl.java:107) [squash-ta-engine-1.9.0-RELEASE.jar:?]
at org.squashtest.ta.backbone.engine.impl.EcosystemRunnerImpl.runAllTests(EcosystemRunnerImpl.java:202) [squash-ta-engine-1.9.0-RELEASE.jar:?]
at org.squashtest.ta.backbone.engine.impl.EcosystemRunnerImpl.run(EcosystemRunnerImpl.java:104) [squash-ta-engine-1.9.0-RELEASE.jar:?]
at org.squashtest.ta.backbone.engine.impl.SuiteRunnerImpl.execute(SuiteRunnerImpl.java:68) [squash-ta-engine-1.9.0-RELEASE.jar:?]
at org.squashtest.ta.backbone.engine.impl.EngineImpl.execute(EngineImpl.java:63) [squash-ta-engine-1.9.0-RELEASE.jar:?]
at org.squashtest.ta.maven.SquashTAMojo.executeImpl(SquashTAMojo.java:367) [squash-ta-maven-plugin-1.9.0-RELEASE.jar:?]
at org.squashtest.ta.maven.AbstractSquashTaMojo.execution(AbstractSquashTaMojo.java:85) [squash-ta-maven-plugin-1.9.0-RELEASE.jar:?]
at org.squashtest.ta.maven.AbstractBaseSquashTaMojo.execute(AbstractBaseSquashTaMojo.java:147) [squash-ta-maven-plugin-1.9.0-RELEASE.jar:?]
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) [maven-core-3.0.4.jar:3.0.4]
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) [maven-core-3.0.4.jar:3.0.4]
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) [maven-core-3.0.4.jar:3.0.4]
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) [maven-core-3.0.4.jar:3.0.4]
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) [maven-core-3.0.4.jar:3.0.4]
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) [maven-core-3.0.4.jar:3.0.4]
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) [maven-core-3.0.4.jar:3.0.4]
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) [maven-core-3.0.4.jar:3.0.4]
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) [maven-core-3.0.4.jar:3.0.4]
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) [maven-core-3.0.4.jar:3.0.4]
at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:117) [maven3-interceptor-1.11.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_144]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_144]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_144]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_144]
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329) [plexus-classworlds-2.4.jar:?]
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239) [plexus-classworlds-2.4.jar:?]
at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:181) [maven3-agent-1.11.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_144]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_144]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_144]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_144]
at hudson.maven.Maven3Builder.call(Maven3Builder.java:139) [?:?]
at hudson.maven.Maven3Builder.call(Maven3Builder.java:70) [?:?]
at hudson.remoting.UserRequest.perform(UserRequest.java:205) [remoting-3.12.jar:?]
at hudson.remoting.UserRequest.perform(UserRequest.java:52) [remoting-3.12.jar:?]
at hudson.remoting.Request$2.run(Request.java:356) [remoting-3.12.jar:?]
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) [remoting-3.12.jar:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_144]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_144]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_144]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]
16:16:38.439 [pool-1-thread-1 for channel id=53] ERROR org.squashtest.ta.backbone.engine.impl.TestRunnerImpl - The execution raised an error in the TEST phase of the TA script 'first-test.ta' with the message: 'Test Automation Engine error (non SUT) : method 'convert' from engine component of class 'org.squashtest.ta.plugin.commons.converter.FileToJavaCodeBundle' with argument 'org.squashtest.ta.framework.components.FileResource' has thrown an exception.'.
[INFO] Exporting results
[INFO] Cleaning resources
[INFO] Squash TA : build complete.
[INFO]
[INFO] BUILD FAILURE
[INFO]
[INFO] Total time: 9.772s
[INFO] Finished at: Tue Sep 26 16:16:39 CEST 2017
[INFO] Final Memory: 19M/224M
En attente que Jenkins finisse de récupérer les données[INFO]
[ERROR] Failed to execute goal org.squashtest.ta:squash-ta-maven-plugin:1.9.0-RELEASE:run (default-cli) on project my.myTestProject: Build failure : there are tests failures

[ERROR] Test statistics : 1 test runs, 0 passed, 1 tests didn't pass
[ERROR] Tests failed / crashed :
[JENKINS] Archiving C:\Users\mnh1\Desktop\Util\programmes\workspace_SquashTA\my.myTestProject\pom.xml to org.testProject1/my.myTestProject/1.0/my.myTestProject-1.0.pom
[ERROR]
[ERROR] tests:
[ERROR] ==> first-test.ta
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
channel stopped
Finished: FAILURE

Merci d'avance pour votre aide.
L'administrateur a désactivé l'accès en écriture pour le public.

Build de projet impossible avec Jenkins il y a 1 an 4 mois #6303

  • Eric Degenetais
  • Portrait de Eric Degenetais
  • Hors Ligne
  • Junior Boarder
  • Messages : 38
  • Remerciements reçus 5
bonjour,
visiblement votre environnement est majoritairemment java 8.
Votre projet Eclipse ne serait-il pas Java 8 ? Si c'est le cas, faites vous appel à des syntaxes spécifiques de Java 8 ou à des API spécifiques de java 8?
Dans ce cas, le jdk 7 est alors incapable de compiler le code d'où votre problème.

Cordialement

Éric
L'administrateur a désactivé l'accès en écriture pour le public.
Modérateurs: Laurent MASSER
Temps de génération de la page : 0.157 secondes