I have a Jenkins server that orchestrates my build. Generally, it performs lighter builds, but I need slave to build GWT projects over the SSD. I have some freedom with this slave , but it is a borrowed resource from another company.
By the way, on this machine that the other company gave in kindly, there is a Jenkins server on which the product build of that other company is performed. And I would not want to bother with a possible JDK change without having control that the change will completely sandboxed so as not to affect the product of others.
Available build JDK options:
IconfiguredJenkinstobuildwithJDK8u91astheimage:
Obtainingthefollowingerrormessage:
InstallingPATH/TO/SLAVE/tools/hudson.model.JDK/JDK_8u91/jdk.exe
[JDK_8u91]$PATH/TO/SLAVE/tools/hudson.model.JDK/JDK_8u91/jdk.exe/sADDLOCAL="ToolsFeature" REBOOT = ReallySuppress INSTALLDIR = PATH \ TO \ SLAVE \ tools \ hudson.model.JDK \ JDK_8u91 / L PATH \ TO \ SLAVE \ tools \ hudson.model.JDK \ install2115761959202298069log
ERROR: SEVERE ERROR occurs
org.jenkinsci.lib.envinject.EnvInjectException: java.io.IOException: Can not run program "PATH / TO / SLAVE / tools / hudson.model.JDK / JDK_8u91 / jdk.exe" (in directory "PATH \ TO \ SLAVE \ hudson.model.JDK \ JDK_8u91 "): CreateProcess error = 740, The requested operation requires elevation
at org.jenkinsci.plugins.envinject.service.EnvInjectVariableGetter.getBuildVariables (EnvInjectVariableGetter.java:91)
[... lines omitted because they appear to be irrelevant ...]
Caused by: java.io.IOException: Can not run program "PATH / TO / SLAVE / hudson.model.JDK / JDK_8u91 / jdk.exe" (in directory "PATH \ TO \ SLAVE \ tools \ hudson.model.JDK \ JDK_8u91 "): CreateProcess error = 740, The requested operation requires elevation
at java.lang.ProcessBuilder.start (Unknown Source)
[... lines omitted because they appear to be irrelevant ...]
Caused by: java.io.IOException: CreateProcess error = 740, The requested operation requires elevation
at java.lang.ProcessImpl.create (Native Method)
[... lines omitted because they appear to be irrelevant ...]
I accessed the slave server and ran the install command line manually at the prompt with administrator permissions:
PATH/TO/SLAVE/tools/hudson.model.JDK/JDK_8u91/jdk.exe /s ADDLOCAL="ToolsFeature" REBOOT=ReallySuppress INSTALLDIR=PATH\TO\SLAVE\tools\hudson.model.JDK\JDK_8u91 /L PATH\TO\SLAVE\tools\hudson.model.JDK\install2115761959202298069log
However, when trying to build again, I get exactly the same error message. As if Jenkins had not identified the newly installed JDK.
When trying to select JDK8u25, Jenkins thought it was installed because it did not try to run the installer, but in reality it has an inconsistency in the system because the executable is not in the desired place:
[project-gwt] $ OTHER \ JENKINS \ tools \ hudson.model.JDK \ JDK_8u25 \ jdk1.8.0_25 / bin / java -cp PATH / TO / SLAVE / maven31-agent.jar; PATH \ TO \ SLAVE \ tools \ hudson.tasks.Maven_MavenInstallation \ MVN_311 \ boot \ plexus-classworlds-2.5.1.jar; PATH \ TO \ SLAVE \ tools \ hudson.tasks.Maven_MavenInstallation \ MVN_311 / conf / logging jenkins.maven3.agent.Maven31Main PATH /TO/SLAVE/tools/hudson.tasks.Maven_MavenInstallation/MVN_311 PATH \ TO \ USER \ AppData \ LocalLow \ Sun \ Java \ Deployment \ cache \ 6.0 \ 3 \ 893ffc3-1f519d29 PATH / TO / SLAVE / maven31-interceptor.jar PATH / TO / SLAVE / maven3-interceptor-commons.jar 51822
ERROR: Failed to parse POMs
java.io.IOException: Can not run program "OTHER \ JENKINS \ tools \ hudson.model.JDK \ JDK_8u25 \ jdk1.8.0_25 / bin / java" (in directory "PATH \ TO \ SLAVE \ workspace \ GeoSales_Portal \ portal") : CreateProcess error = 2, The system can not find the specified file
at java.lang.ProcessBuilder.start (Unknown Source)
[... lines omitted because they appear to be irrelevant ...]
- How to install JDK via Jenkins on slave without high access?
About fixing the GWT project to make the build fast ... we're working on it. There are 109 classes dealing with asynchronous GWT requests, done by passing HashMap
and receiving List
or List<HashMap>
in response. Yes, it was originally raw . But the work of the legacy is too large to fix, we have been working since last year between one customization and another to lessen the time the GWT is processing the oracle typing things up, or using specific classes for the required end.
But this is not feasible to fix in the short term ...