Hudson ignoring JAVA_HOME in configuration?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Hudson ignoring JAVA_HOME in configuration?

Nord, James-2
Hi all,
 
after some issues with SCM polling a cleaned my Hudson install and upgraded to 1.129 (winxp tomcat 6.0 jre 1.6.0_u1).
 
Since this, Hudson seems to be ignoring its configuration and is starting native m2 (beta) jobs with the jre used to start tomcat and not the jdk that is configured in Hudson's system configuration.
 
"JDK installation" in /configure is set to C:\Progra~1\Java\jdk1.6.0_01
 
however maven jobs fail with the following:
 
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
Unable to locate the Javac Compiler in:
  C:\Program Files\Java\jre1.6.0_01\..\lib\tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable.
 

Unable to locate the Javac Compiler in:
  C:\Program Files\Java\jre1.6.0_01\..\lib\tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable.
The jre above is what is used to launch tomcat and this has not been changed since previous versions, but now Hudson seems to want to use this.  Anyone any ideas on how to continue?
 
Regards,
 
    /James
 
 
*********************************************************************************************************
This e-mail is confidential, the property of NDS Ltd and intended for the addressee only. Any dissemination, copying or distribution of this message or any attachments by anyone other than the intended recipient is strictly prohibited. If you have received this message in error, please immediately notify the [hidden email] and destroy the original message. Messages sent to and from NDS may be monitored. NDS cannot guarantee any message delivery method is secure or error-free. Information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. We do not accept responsibility for any errors or omissions in this message and/or attachment that arise as a result of transmission. You should carry out your own virus checks before opening any attachment. Any views or opinions presented are solely those of the author and do not necessarily represent those of NDS.

To protect the environment please do not print this e-mail unless necessary.

NDS Limited Registered office: One Heathrow Boulevard, 286 Bath Road, West Drayton, Middlesex, UB7 0DQ, United Kingdom. A company registered in England and Wales Registered no. 3080780 VAT no. GB 603 8808 40-00
**********************************************************************************************************
Reply | Threaded
Open this post in threaded view
|

RE: Hudson ignoring JAVA_HOME in configuration?

Nord, James-2
Ok,
 
Seems that I and Hudson disagree on what "Default" means for JDK use in project settings :-)  I thought (wrongly) that under JDK in per project settings if I had "default" then it would use the default JDK as defined in Hudson settings.
 
If only one JDK was defined I would expect it to pick that one, if more than one was defined then the first one entered (and perhaps if none where defined - {if that is legal} then use the platform default or one that the container is running in)
 
/James
 


From: Nord, James [mailto:[hidden email]]
Sent: 20 August 2007 14:04
To: [hidden email]
Subject: Hudson ignoring JAVA_HOME in configuration?

Hi all,
 
after some issues with SCM polling a cleaned my Hudson install and upgraded to 1.129 (winxp tomcat 6.0 jre 1.6.0_u1).
 
Since this, Hudson seems to be ignoring its configuration and is starting native m2 (beta) jobs with the jre used to start tomcat and not the jdk that is configured in Hudson's system configuration.
 
"JDK installation" in /configure is set to C:\Progra~1\Java\jdk1.6.0_01
 
however maven jobs fail with the following:
 
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
Unable to locate the Javac Compiler in:
  C:\Program Files\Java\jre1.6.0_01\..\lib\tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable.
 

Unable to locate the Javac Compiler in:
  C:\Program Files\Java\jre1.6.0_01\..\lib\tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable.
The jre above is what is used to launch tomcat and this has not been changed since previous versions, but now Hudson seems to want to use this.  Anyone any ideas on how to continue?
 
Regards,
 
    /James
 
 
*********************************************************************************************************
This e-mail is confidential, the property of NDS Ltd and intended for the addressee only. Any dissemination, copying or distribution of this message or any attachments by anyone other than the intended recipient is strictly prohibited. If you have received this message in error, please immediately notify the [hidden email] and destroy the original message. Messages sent to and from NDS may be monitored. NDS cannot guarantee any message delivery method is secure or error-free. Information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. We do not accept responsibility for any errors or omissions in this message and/or attachment that arise as a result of transmission. You should carry out your own virus checks before opening any attachment. Any views or opinions presented are solely those of the author and do not necessarily represent those of NDS.

To protect the environment please do not print this e-mail unless necessary.

NDS Limited Registered office: One Heathrow Boulevard, 286 Bath Road, West Drayton, Middlesex, UB7 0DQ, United Kingdom. A company registered in England and Wales Registered no. 3080780 VAT no. GB 603 8808 40-00
**********************************************************************************************************
Disclaimer:
*********************************************************************************************************
This e-mail is confidential, the property of NDS Ltd and intended for the addressee only. Any dissemination, copying or distribution of this message or any attachments by anyone other than the intended recipient is strictly prohibited. If you have received this message in error, please immediately notify the [hidden email] and destroy the original message. Messages sent to and from NDS may be monitored. NDS cannot guarantee any message delivery method is secure or error-free. Information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. We do not accept responsibility for any errors or omissions in this message and/or attachment that arise as a result of transmission. You should carry out your own virus checks before opening any attachment. Any views or opinions presented are solely those of the author and do not necessarily represent those of NDS.

To protect the environment please do not print this e-mail unless necessary.

NDS Limited Registered office: One Heathrow Boulevard, 286 Bath Road, West Drayton, Middlesex, UB7 0DQ, United Kingdom. A company registered in England and Wales Registered no. 3080780 VAT no. GB 603 8808 40-00
**********************************************************************************************************
*********************************************************************************************************
This e-mail is confidential, the property of NDS Ltd and intended for the addressee only. Any dissemination, copying or distribution of this message or any attachments by anyone other than the intended recipient is strictly prohibited. If you have received this message in error, please immediately notify the [hidden email] and destroy the original message. Messages sent to and from NDS may be monitored. NDS cannot guarantee any message delivery method is secure or error-free. Information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. We do not accept responsibility for any errors or omissions in this message and/or attachment that arise as a result of transmission. You should carry out your own virus checks before opening any attachment. Any views or opinions presented are solely those of the author and do not necessarily represent those of NDS.

To protect the environment please do not print this e-mail unless necessary.

NDS Limited Registered office: One Heathrow Boulevard, 286 Bath Road, West Drayton, Middlesex, UB7 0DQ, United Kingdom. A company registered in England and Wales Registered no. 3080780 VAT no. GB 603 8808 40-00
**********************************************************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: Hudson ignoring JAVA_HOME in configuration?

Brant Boehmann
In reply to this post by Nord, James-2
I did this same thing the other day. I had the proper JDK configured in Hudson, but I had overlooked it in the job configuration. I forgot to select the proper jdk there. Try double checking the specific job configuration.

On 8/20/07, Nord, James <[hidden email]> wrote:
Hi all,
 
after some issues with SCM polling a cleaned my Hudson install and upgraded to 1.129 (winxp tomcat 6.0 jre 1.6.0_u1).
 
Since this, Hudson seems to be ignoring its configuration and is starting native m2 (beta) jobs with the jre used to start tomcat and not the jdk that is configured in Hudson's system configuration.
 
"JDK installation" in /configure is set to C:\Progra~1\Java\jdk1.6.0_01
 
however maven jobs fail with the following:
 
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
Unable to locate the Javac Compiler in:
  C:\Program Files\Java\jre1.6.0_01\..\lib\tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable.
 

Unable to locate the Javac Compiler in:
  C:\Program Files\Java\jre1.6.0_01\..\lib\tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable.
The jre above is what is used to launch tomcat and this has not been changed since previous versions, but now Hudson seems to want to use this.  Anyone any ideas on how to continue?
 
Regards,
 
    /James
 
 
*********************************************************************************************************
This e-mail is confidential, the property of NDS Ltd and intended for the addressee only. Any dissemination, copying or distribution of this message or any attachments by anyone other than the intended recipient is strictly prohibited. If you have received this message in error, please immediately notify the [hidden email] and destroy the original message. Messages sent to and from NDS may be monitored. NDS cannot guarantee any message delivery method is secure or error-free. Information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. We do not accept responsibility for any errors or omissions in this message and/or attachment that arise as a result of transmission. You should carry out your own virus checks before opening any attachment. Any views or opinions presented are solely those of the author and do not necessarily represent those of NDS.

To protect the environment please do not print this e-mail unless necessary.

NDS Limited Registered office: One Heathrow Boulevard, 286 Bath Road, West Drayton, Middlesex, UB7 0DQ, United Kingdom. A company registered in England and Wales Registered no. 3080780 VAT no. GB 603 8808 40-00
**********************************************************************************************************

Reply | Threaded
Open this post in threaded view
|

Re: Hudson ignoring JAVA_HOME in configuration?

Kohsuke Kawaguchi
Administrator
In reply to this post by Nord, James-2
Nord, James wrote:

> Ok,
>  
> Seems that I and Hudson disagree on what "Default" means for JDK use in
> project settings :-)  I thought (wrongly) that under JDK in per project
> settings if I had "default" then it would use the default JDK as defined
> in Hudson settings.
>  
> If only one JDK was defined I would expect it to pick that one, if more
> than one was defined then the first one entered (and perhaps if none
> where defined - {if that is legal} then use the platform default or one
> that the container is running in)
You are correct --- that's what Hudson current does.

That said, when there's only one JDK configured, I think Hudson should
just use that, without even presenting the JDK config option. As you
found out the notion of "default" is bit confusing.

When it comes to choosing maven (for the native m2 project), Hudson does
this correctly.

--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]

smime.p7s (4K) Download Attachment