-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Platform: All, OS: All
When using the autoinstall feature to install JDK4 onto a node, it fails:
Downloading
http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/j2sdk-1_4_2_18-linux-i586.bin?BundledLineItemUUID=2YtIBe.lAAYAAAEixaFE61V_&OrderID=7P5IBe.lXzgAAAEiraFE61V_&ProductID=8ntIBe.o_Y8AAAEac8YGcZhi&FileName=/j2sdk-1_4_2_18-linux-i586.bin
Installing /home/hudson/tools/jdk4/jdk.sh
[license stuff]
Extracting...
UnZipSFX 5.40 of 28 November 1998, by Info-ZIP (Zip-Bugs@lists.wku.edu).
creating: j2sdk1.4.2_18/
[more files]
Done.
FATAL: command execution failed
hudson.AbortException: Failed to find the extracted JDKs: []
at hudson.tools.JDKInstaller.performInstallation(JDKInstaller.java:132)
at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:61)
at
hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:99)
at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:155)
at hudson.model.JDK.forNode(JDK.java:118)
at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:458)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:78)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:58)
at hudson.model.Build$RunnerImpl.build(Build.java:195)
at hudson.model.Build$RunnerImpl.doRun(Build.java:151)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:271)
at hudson.model.Run.run(Run.java:938)
at hudson.model.Build.run(Build.java:112)
at hudson.model.ResourceController.execute(ResourceController.java:93)
at hudson.model.Executor.run(Executor.java:118)
When I subsequently move the fiels from tools/jdk4/j2sdk1.4.2_18/ to tools/jdk4/
and touch tools/jdk4/.installedByHudson, it can be used. The culprit probably is
http://fisheye4.atlassian.com/browse/hudson/trunk/hudson/main/core/src/main/java/hudson/tools/JDKInstaller.java?r=19225#l218
, where it is expected that the extracted jdk.sh creates a directory that begins
with "jdk". JDK4, however, starts with "j2sdk" instead. What about
return f.isDirectory() && (f.getName().startsWith("jdk") ||
f.getName().startswith("j2sdk"));