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

buckminster execution uses /bin/java instead of configured jdk

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      building a freestyle project to run the buckminster aggregator results in an error:

      Commandline:
      /bin/java -Dbuckminster.output.root=/usr/local/development/hudson/hudson_home/jobs/buckminster/workspace//buckminster.output -Dbuckminster.temp.root=/usr/local/development/hudson/hudson_home/jobs/buckminster/workspace//buckminster.temp -Xmx512m -jar plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar -application org.eclipse.buckminster.cmdline.headless -data /usr/local/development/hudson/hudson_home/jobs/buckminster/workspace/ --loglevel info -S /usr/local/development/hudson/hudson_home/jobs/buckminster/builds/2010-03-17_17-41-58/commands.txt ERROR: Cannot run program "/bin/java" (in directory "/usr/local/development/buckminster"): java.io.IOException: error=2, No such file or directory

      • Hudson has a configured JDK
      • hudson-plugin version is 0.9.3.

      Could this is related to http://issues.jenkins-ci.org/browse/JENKINS-5004?

        Attachments

          Activity

          Hide
          jutzig jutzig added a comment -

          Hi,
          to me this looks like it uses the JDK configured by hudson, otherwise it would not be '/bin/java', but just 'java':
          http://fisheye.jenkins-ci.org/browse/Hudson/trunk/hudson/plugins/buckminster/src/main/java/hudson/plugins/buckminster/command/CommandLineBuilder.java?r2=24553&r1=24093

          Is it possible that there are multiple JDKs configured and this is just the wrong one?

          Show
          jutzig jutzig added a comment - Hi, to me this looks like it uses the JDK configured by hudson, otherwise it would not be '/bin/java', but just 'java': http://fisheye.jenkins-ci.org/browse/Hudson/trunk/hudson/plugins/buckminster/src/main/java/hudson/plugins/buckminster/command/CommandLineBuilder.java?r2=24553&r1=24093 Is it possible that there are multiple JDKs configured and this is just the wrong one?
          Hide
          lfischer lfischer added a comment -

          Hello,

          My Hudson is running as .war inside a tomcat. There was only one JDK configured for the Hudson instance. So the project configuration had no option to choose an other JDK.

          Now I added a second JDK and set the project configuration to one of them. But the error still occures.

          Your code looks right, but I use the latest version of the hudson buckminster plugin and I still get the error.

          Show
          lfischer lfischer added a comment - Hello, My Hudson is running as .war inside a tomcat. There was only one JDK configured for the Hudson instance. So the project configuration had no option to choose an other JDK. Now I added a second JDK and set the project configuration to one of them. But the error still occures. Your code looks right, but I use the latest version of the hudson buckminster plugin and I still get the error.
          Hide
          jutzig jutzig added a comment -

          And the path gets still resolved as /bin/java with the other JDK configured?
          This is really kinda odd since that seems to be the information passed by hudson.
          I will try my best to reproduce this at home but so far I don't really understand what's going wrong here.
          How was the JDK configured btw? Which path did you expect to get? Is there a slave involved, or is it a single master?

          Show
          jutzig jutzig added a comment - And the path gets still resolved as /bin/java with the other JDK configured? This is really kinda odd since that seems to be the information passed by hudson. I will try my best to reproduce this at home but so far I don't really understand what's going wrong here. How was the JDK configured btw? Which path did you expect to get? Is there a slave involved, or is it a single master?
          Hide
          lfischer lfischer added a comment -

          The JDK was added on the Hudson main configuration page.
          I choosed automatic installation from java.sun.com (6 update 18).
          This installed the JDK named "JDK_6_18" in the folder "${HUDSON_HOME}/tools/JDK_6_18".
          HUDSON_HOME is set through a tomcat property. This JDK will not be found by the search path on the command line but I never had some trouble with this settings.

          There are no slaves involved.

          Show
          lfischer lfischer added a comment - The JDK was added on the Hudson main configuration page. I choosed automatic installation from java.sun.com (6 update 18). This installed the JDK named "JDK_6_18" in the folder "${HUDSON_HOME}/tools/JDK_6_18". HUDSON_HOME is set through a tomcat property. This JDK will not be found by the search path on the command line but I never had some trouble with this settings. There are no slaves involved.
          Hide
          jutzig jutzig added a comment -

          Unfortunately I was not able to reproduce the error you're describing.
          However, I just released version 0.9.4 of the plugin that includes major changes to support automatic installation/provisioning of buckminster itself.
          There have also been changes to the code that does the java invocation during the build, so hopefully your issue is fixed with the new release.
          Please give it a shot and let me know if it works for you now.

          Show
          jutzig jutzig added a comment - Unfortunately I was not able to reproduce the error you're describing. However, I just released version 0.9.4 of the plugin that includes major changes to support automatic installation/provisioning of buckminster itself. There have also been changes to the code that does the java invocation during the build, so hopefully your issue is fixed with the new release. Please give it a shot and let me know if it works for you now.
          Hide
          lfischer lfischer added a comment -

          I updated to the latest version, but I still get the same error message.
          Now I put a link from /bin/java to the right place and that is working for now.

          Is it possible to add some debug logging to the code, that I can look what my installation is doing?

          Show
          lfischer lfischer added a comment - I updated to the latest version, but I still get the same error message. Now I put a link from /bin/java to the right place and that is working for now. Is it possible to add some debug logging to the code, that I can look what my installation is doing?
          Hide
          jutzig jutzig added a comment -

          The CommandlineBuilder asks the job's JDK for existance now. If the JDK does not exist, an error message is printed to the build logger and 'java' gets executed as a fallback.

          Fix released to TRUNK revision 29193, available in 0.9.5

          Show
          jutzig jutzig added a comment - The CommandlineBuilder asks the job's JDK for existance now. If the JDK does not exist, an error message is printed to the build logger and 'java' gets executed as a fallback. Fix released to TRUNK revision 29193, available in 0.9.5
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : jutzig
          Path:
          trunk/hudson/plugins/buckminster/src/main/java/hudson/plugins/buckminster/command/CommandLineBuilder.java
          http://jenkins-ci.org/commit/29192
          Log:
          JENKINS-5971 buckminster execution uses /bin/java instead of configured jdk
          ask the JDK if it exists. If not, print an error message and default to 'java'

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : jutzig Path: trunk/hudson/plugins/buckminster/src/main/java/hudson/plugins/buckminster/command/CommandLineBuilder.java http://jenkins-ci.org/commit/29192 Log: JENKINS-5971 buckminster execution uses /bin/java instead of configured jdk ask the JDK if it exists. If not, print an error message and default to 'java'

            People

            Assignee:
            jutzig jutzig
            Reporter:
            lfischer lfischer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: