can't run ant?

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

can't run ant?

Rusty Wright
This must be something simple. On the hudson/configure page, in the Ant section, for ANT_HOME I have /usr/local/java/ant. In that directory are the usual suspects, the directories bin, docs, etc, lib, and so on.  The bin directory has the ant executable in it (a shell script; this is on unix/solaris).

Actually, I have 2 entries for ant; the one given above is a symbolic link, so I added another one for the real ant; /usr/local/java/apache-ant-1.7.0, but that didn't help.  JAVA_HOME is set to /usr/java (which is a symbolic link to jdk/jdk1.6.0_03/).

If I go into the directory listed below where it's trying to do the build, /local_a/servers/hudson/jobs/test1/workspace/test1, and run ant, it runs ok.

I'm running hudson in tomcat, which is running as the user tomcat.  The HUDSON_HOME is owned by tomcat, as are the subdirectories it created.

So what's wrong?


started
Checking out <a class="moz-txt-link-freetext" href="svn+ssh://cafe-dev.berkeley.edu/users/cafe/rusty/subversion/test1">svn+ssh://cafe-dev.berkeley.edu/users/cafe/rusty/subversion/test1
A build.xml
At revision 1
no change for <a class="moz-txt-link-freetext" href="svn+ssh://cafe-dev.berkeley.edu/users/cafe/rusty/subversion/test1">svn+ssh://cafe-dev.berkeley.edu/users/cafe/rusty/subversion/test1 since the previous build
[test1] $ ant
FATAL: command execution failed
java.io.IOException: Cannot run program "ant" (in directory "/local_a/servers/hudson/jobs/test1/workspace/test1"): error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
at hudson.Proc$LocalProc.<init>(Proc.java:80)
at hudson.Launcher$LocalLauncher.createLocalProc(Launcher.java:290)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:281)
at hudson.Launcher.launch(Launcher.java:119)
at hudson.Launcher.launch(Launcher.java:71)
at hudson.tasks.Ant.perform(Ant.java:171)
at hudson.model.Build$RunnerImpl.build(Build.java:156)
at hudson.model.Build$RunnerImpl.doRun(Build.java:124)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:192)
at hudson.model.Run.run(Run.java:649)
at hudson.model.Build.run(Build.java:102)
at hudson.model.ResourceController.execute(ResourceController.java:70)
at hudson.model.Executor.run(Executor.java:64)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:53)
at java.lang.ProcessImpl.start(ProcessImpl.java:65)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
... 13 more
finished: FAILURE
--
[hidden email]
UC Berkeley, IS&T Web Applications
510-643-9097 office
925-212-3774 cell
Reply | Threaded
Open this post in threaded view
|

Re: can't run ant?

Kohsuke Kawaguchi
Administrator
Rusty Wright wrote:

> This must be something simple. On the hudson/configure page, in the Ant section,
> for ANT_HOME I have /usr/local/java/ant. In that directory are the usual
> suspects, the directories bin, docs, etc, lib, and so on.  The bin directory has
> the ant executable in it (a shell script; this is on unix/solaris).
>
> Actually, I have 2 entries for ant; the one given above is a symbolic link, so I
> added another one for the real ant; /usr/local/java/apache-ant-1.7.0, but that
> didn't help.  JAVA_HOME is set to /usr/java (which is a symbolic link to
> jdk/jdk1.6.0_03/).
>
> If I go into the directory listed below where it's trying to do the build,
> /local_a/servers/hudson/jobs/test1/workspace/test1, and run ant, it runs ok.
>
> I'm running hudson in tomcat, which is running as the user tomcat.  The
> HUDSON_HOME is owned by tomcat, as are the subdirectories it created.
>
> So what's wrong?
It looks like your job configuration is pointing to the default Ant
(which means you need to have Ant in the path.) Pick the one you
configured in the system configuration.


> started
> Checking out svn+ssh://cafe-dev.berkeley.edu/users/cafe/rusty/subversion/test1
> A build.xml
> At revision 1
> no change for svn+ssh://cafe-dev.berkeley.edu/users/cafe/rusty/subversion/test1
> since the previous build
> [test1] $ ant
> FATAL: command execution failed
> java.io.IOException: Cannot run program "ant" (in directory
> "/local_a/servers/hudson/jobs/test1/workspace/test1"): error=2, No such file or
> directory
> at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
> at hudson.Proc$LocalProc.<init>(Proc.java:80)
> at hudson.Launcher$LocalLauncher.createLocalProc(Launcher.java:290)
> at hudson.Launcher$LocalLauncher.launch(Launcher.java:281)
> at hudson.Launcher.launch(Launcher.java:119)
> at hudson.Launcher.launch(Launcher.java:71)
> at hudson.tasks.Ant.perform(Ant.java:171)
> at hudson.model.Build$RunnerImpl.build(Build.java:156)
> at hudson.model.Build$RunnerImpl.doRun(Build.java:124)
> at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:192)
> at hudson.model.Run.run(Run.java:649)
> at hudson.model.Build.run(Build.java:102)
> at hudson.model.ResourceController.execute(ResourceController.java:70)
> at hudson.model.Executor.run(Executor.java:64)
> Caused by: java.io.IOException: error=2, No such file or directory
> at java.lang.UNIXProcess.forkAndExec(Native Method)
> at java.lang.UNIXProcess.<init>(UNIXProcess.java:53)
> at java.lang.ProcessImpl.start(ProcessImpl.java:65)
> at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
> ... 13 more
> finished: FAILURE
> --
> Rusty Wright <mailto:[hidden email]>
> UC Berkeley, IS&T Web Applications
> 510-643-9097 office
> 925-212-3774 cell
>

--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: can't run ant?

Rusty Wright
Duh; yep, that's it.  Thanks.


Kohsuke Kawaguchi wrote:

> Rusty Wright wrote:
>> This must be something simple. On the hudson/configure page, in the
>> Ant section, for ANT_HOME I have /usr/local/java/ant. In that
>> directory are the usual suspects, the directories bin, docs, etc,
>> lib, and so on.  The bin directory has the ant executable in it (a
>> shell script; this is on unix/solaris).
>>
>> Actually, I have 2 entries for ant; the one given above is a symbolic
>> link, so I added another one for the real ant;
>> /usr/local/java/apache-ant-1.7.0, but that didn't help.  JAVA_HOME is
>> set to /usr/java (which is a symbolic link to jdk/jdk1.6.0_03/).
>>
>> If I go into the directory listed below where it's trying to do the
>> build, /local_a/servers/hudson/jobs/test1/workspace/test1, and run
>> ant, it runs ok.
>>
>> I'm running hudson in tomcat, which is running as the user tomcat.  
>> The HUDSON_HOME is owned by tomcat, as are the subdirectories it
>> created.
>>
>> So what's wrong?
>
> It looks like your job configuration is pointing to the default Ant
> (which means you need to have Ant in the path.) Pick the one you
> configured in the system configuration.
>
>
>> started
>> Checking out
>> svn+ssh://cafe-dev.berkeley.edu/users/cafe/rusty/subversion/test1
>> A build.xml
>> At revision 1
>> no change for
>> svn+ssh://cafe-dev.berkeley.edu/users/cafe/rusty/subversion/test1
>> since the previous build
>> [test1] $ ant
>> FATAL: command execution failed
>> java.io.IOException: Cannot run program "ant" (in directory
>> "/local_a/servers/hudson/jobs/test1/workspace/test1"): error=2, No
>> such file or directory
>> at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
>> at hudson.Proc$LocalProc.<init>(Proc.java:80)
>> at hudson.Launcher$LocalLauncher.createLocalProc(Launcher.java:290)
>> at hudson.Launcher$LocalLauncher.launch(Launcher.java:281)
>> at hudson.Launcher.launch(Launcher.java:119)
>> at hudson.Launcher.launch(Launcher.java:71)
>> at hudson.tasks.Ant.perform(Ant.java:171)
>> at hudson.model.Build$RunnerImpl.build(Build.java:156)
>> at hudson.model.Build$RunnerImpl.doRun(Build.java:124)
>> at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:192)
>> at hudson.model.Run.run(Run.java:649)
>> at hudson.model.Build.run(Build.java:102)
>> at hudson.model.ResourceController.execute(ResourceController.java:70)
>> at hudson.model.Executor.run(Executor.java:64)
>> Caused by: java.io.IOException: error=2, No such file or directory
>> at java.lang.UNIXProcess.forkAndExec(Native Method)
>> at java.lang.UNIXProcess.<init>(UNIXProcess.java:53)
>> at java.lang.ProcessImpl.start(ProcessImpl.java:65)
>> at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
>> ... 13 more
>> finished: FAILURE
>> --
>> Rusty Wright <mailto:[hidden email]>
>> UC Berkeley, IS&T Web Applications
>> 510-643-9097     office
>> 925-212-3774     cell
>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: can't run ant?

Kohsuke Kawaguchi
Administrator
Rusty Wright wrote:
> Duh; yep, that's it.  Thanks.

In 1.160 I improved the error diagnostics of this so that Hudson will
suggest you to check your job configuration.

>
>
> Kohsuke Kawaguchi wrote:
>> Rusty Wright wrote:
>>> This must be something simple. On the hudson/configure page, in the
>>> Ant section, for ANT_HOME I have /usr/local/java/ant. In that
>>> directory are the usual suspects, the directories bin, docs, etc,
>>> lib, and so on.  The bin directory has the ant executable in it (a
>>> shell script; this is on unix/solaris).
>>>
>>> Actually, I have 2 entries for ant; the one given above is a symbolic
>>> link, so I added another one for the real ant;
>>> /usr/local/java/apache-ant-1.7.0, but that didn't help.  JAVA_HOME is
>>> set to /usr/java (which is a symbolic link to jdk/jdk1.6.0_03/).
>>>
>>> If I go into the directory listed below where it's trying to do the
>>> build, /local_a/servers/hudson/jobs/test1/workspace/test1, and run
>>> ant, it runs ok.
>>>
>>> I'm running hudson in tomcat, which is running as the user tomcat.  
>>> The HUDSON_HOME is owned by tomcat, as are the subdirectories it
>>> created.
>>>
>>> So what's wrong?
>>
>> It looks like your job configuration is pointing to the default Ant
>> (which means you need to have Ant in the path.) Pick the one you
>> configured in the system configuration.
>>
>>
>>> started
>>> Checking out
>>> svn+ssh://cafe-dev.berkeley.edu/users/cafe/rusty/subversion/test1
>>> A build.xml
>>> At revision 1
>>> no change for
>>> svn+ssh://cafe-dev.berkeley.edu/users/cafe/rusty/subversion/test1
>>> since the previous build
>>> [test1] $ ant
>>> FATAL: command execution failed
>>> java.io.IOException: Cannot run program "ant" (in directory
>>> "/local_a/servers/hudson/jobs/test1/workspace/test1"): error=2, No
>>> such file or directory
>>> at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
>>> at hudson.Proc$LocalProc.<init>(Proc.java:80)
>>> at hudson.Launcher$LocalLauncher.createLocalProc(Launcher.java:290)
>>> at hudson.Launcher$LocalLauncher.launch(Launcher.java:281)
>>> at hudson.Launcher.launch(Launcher.java:119)
>>> at hudson.Launcher.launch(Launcher.java:71)
>>> at hudson.tasks.Ant.perform(Ant.java:171)
>>> at hudson.model.Build$RunnerImpl.build(Build.java:156)
>>> at hudson.model.Build$RunnerImpl.doRun(Build.java:124)
>>> at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:192)
>>> at hudson.model.Run.run(Run.java:649)
>>> at hudson.model.Build.run(Build.java:102)
>>> at hudson.model.ResourceController.execute(ResourceController.java:70)
>>> at hudson.model.Executor.run(Executor.java:64)
>>> Caused by: java.io.IOException: error=2, No such file or directory
>>> at java.lang.UNIXProcess.forkAndExec(Native Method)
>>> at java.lang.UNIXProcess.<init>(UNIXProcess.java:53)
>>> at java.lang.ProcessImpl.start(ProcessImpl.java:65)
>>> at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
>>> ... 13 more
>>> finished: FAILURE
>>> --
>>> Rusty Wright <mailto:[hidden email]>
>>> UC Berkeley, IS&T Web Applications
>>> 510-643-9097     office
>>> 925-212-3774     cell
>>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]

smime.p7s (4K) Download Attachment