Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Buckminster » Java path issue with buckminster hudson plugin
Java path issue with buckminster hudson plugin [message #501192] Tue, 01 December 2009 13:33 Go to next message
Jürgen  ing is currently offline Jürgen ingFriend
Messages: 8
Registered: July 2009
Junior Member
Hi,

I use the buckminster Hudson plugin in an environment I cannot control.
When I am trying to fetch the target Platform I get an error like this:

java
-Dbuckminster.output.root=/webs/web1001/tomcat/hudsonBuildDa ta/jobs/eclipseMail
Target/workspace//buckminster.output
-Dbuckminster.temp.root=/webs/web1001/tomcat/hudsonBuildData /jobs/eclipseMail
Target/workspace//buckminster.temp
-DtargetPlatformPath=${workspace}/target -jar
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715. jar
-application org.eclipse.buckminster.cmdline.headless -data
/webs/web1001/tomcat/hudsonBuildData/jobs/eclipseMail Target/workspace/
--loglevel info -S /webs/web1001/tomcat/hudsonBuildData/jobs/eclipseMail
Target/builds/2009-11-30_18-38-03/commands.txt ERROR:
java.io.IOException: java: not found
Finished: FAILURE

It looks like java is not on the path so it is not found by the
ProcessBuilder. Since I cannot add java to the path I looked for
JAVA_HOME, which is correct. So I took a look onto the source. Maybe it
is possible to check in the CommandLineBuilder whether java is available
in the path or not, somehow like this:

public List<String> buildCommands(…) … {

String javaCommand = "java";
ProcessBuilder processBuilder = new ProcessBuilder(javaCommand);

try {
processBuilder.start();
}
catch (IOException ex) {
// Since the process builder could not start java without a full
// qualified path we will try it with java.home
javaCommand = System.getProperty("java.home") + File.separator +
"bin" + File.separator + javaCommand;
}

// VM Options
commandList.add(javaCommand);

}

Greetings,
Juergen
Re: Java path issue with buckminster hudson plugin [message #501197 is a reply to message #501192] Tue, 01 December 2009 13:58 Go to previous messageGo to next message
Johannes Utzig is currently offline Johannes UtzigFriend
Messages: 329
Registered: July 2009
Senior Member
Hi Jürgen,

that is indeed a bug. Would you please file a bug for the buckminster
component in the hudson issue tracker?
https://hudson.dev.java.net/servlets/ProjectIssues

As for the code, thank you for that. It surely would work for you as a
quick solution. However, I think the correct way of doing this would be
to use the Hudson Tool Installation logic. If you need a quick way to
build now, how about applying your fix locally and build that until I
have a chance to fix the issue?
If you have problems compiling it, I can apply your patch and compile it
for you if you want.
The resulting artifact can simply be installed with an upload form in
the hudson configuration.

I'd just rather fix this correctly while I'm at it instead of replacing
one hack with another.


Best regards,
Johannes
Re: Java path issue with buckminster hudson plugin [message #501663 is a reply to message #501197] Thu, 03 December 2009 10:33 Go to previous messageGo to next message
Jürgen  ing is currently offline Jürgen ingFriend
Messages: 8
Registered: July 2009
Junior Member
Hi Johannes,

I tried to file a bug in the issue tracker your link is targeted to,
without success. I also tried to file an issue in JIRA, but there I do
not even get an action to create an issue. Maybe I have not the
permissions needed to file a bug.

Greetings,
Juergen
Re: Java path issue with buckminster hudson plugin [message #501680 is a reply to message #501663] Thu, 03 December 2009 12:33 Go to previous messageGo to next message
Johannes Utzig is currently offline Johannes UtzigFriend
Messages: 329
Registered: July 2009
Senior Member
Hi Jürgen,

do you have a login yet, or did you create one? You need an account in
order to create and watch issues.


Best regards,
Johannes
Re: Java path issue with buckminster hudson plugin [message #501760 is a reply to message #501680] Thu, 03 December 2009 17:10 Go to previous messageGo to next message
Jürgen  ing is currently offline Jürgen ingFriend
Messages: 8
Registered: July 2009
Junior Member
Hi Johannes,

I have a login and I am logged in but neither in the former bug tracker
you sent me a link to, nor in jira I can file a bug. Maybe this is an
migration issue und it will work later.

Greetings,
Juergen
Re: Java path issue with buckminster hudson plugin [message #501873 is a reply to message #501760] Fri, 04 December 2009 08:33 Go to previous messageGo to next message
Johannes Utzig is currently offline Johannes UtzigFriend
Messages: 329
Registered: July 2009
Senior Member
Hi Jürgen,

that is strange, it worked for me:
http://issues.hudson-ci.org/browse/HUDSON-5004
Add yourself as a watcher if you want to.

Best regards,
Johannes
Re: Java path issue with buckminster hudson plugin [message #503096 is a reply to message #501192] Thu, 10 December 2009 20:32 Go to previous message
Johannes Utzig is currently offline Johannes UtzigFriend
Messages: 329
Registered: July 2009
Senior Member
Hi Jürgen,

I just released version 0.9.3 to the hudson repository which should fix
the issue hopefully. It picks up the JDK you configured in hudson, if
you don't have a JDK configured in hudson, it defaults to the current
behaviour.

Hope it works for you.

Best regards,
Johannes
Previous Topic:Using Buckminster to Build a Web Application
Next Topic:Wildcard in local provider
Goto Forum:
  


Current Time: Thu Apr 25 08:34:54 GMT 2024

Powered by FUDForum. Page generated in 0.05805 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top