You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by Bwolen Yang <wb...@gmail.com> on 2007/06/15 06:56:58 UTC

questions ant for building a patch

Hi,

Running
  ant -Djavac.args="-Xlint -Xmaxwarns 1000" clean test tar
on head of hadoop tree, I get lots of warnings.  e.g.,

    [javac] /home/bwolen/hadoop-trunk/src/test/org/apache/hadoop/ipc/TestRPC.jav
a:154: warning: [cast] redundant cast to java.lang.Object[]
    [javac]     Object[] voids = (Object[])RPC.call(ping, new Object[][]{{},{}},
    [javac]                      ^

    [javac] /home/bwolen/hadoop-trunk/src/test/org/apache/hadoop/mapred/TestSequenceFileInputFilter.java:32:
warning: [deprecation] org.apache.hadoop.mapred.InputFormatBase in
org.apache.hadoop.mapred has been deprecated
    [javac]   private static final Log LOG = InputFormatBase.LOG;

Are these expected or did I miss some configuration steps?

--------------------

During unit test, I get
    [junit] Exception in thread "main" java.lang.NoSuchMethodError:
org.apache.tools.ant.util.FileUtils.close(Ljava/io/OutputStream;)V


Looking at ant's source
apache-ant-1.7.0/src/main/org/apache/tools/ant/util/FileUtils.java
It does define
        public static void close(OutputStream device) {

I have also tried
 ant -lib ${ANT_HOME}/lib -Djavac.args="-Xlint -Xmaxwarns 1000" clean test tar
just in case lib/ant.jar didn't get pick up somehow.

suggestions on what I may have not setup properly?
---------------------------------

I am using ant version 1.7.0 and sun jdk1.6.0_01.

thanks

bwolen

Re: questions ant for building a patch

Posted by Jeff Hammerbacher <je...@gmail.com>.
hi.  i had the same problems as bwolen.  i am using:

jdk: 1.5.0_07
ant: 1.7.0
os: mac os x 10.4.10
hadoop: 0.13.1

i used the same fix as bwolen (removed lib/jetty-ext/ant.jar), and other
than some warnings, i got a "BUILD SUCCESSFUL".

fyi.

jeff



Bwolen Yang wrote:
> 
> On 6/15/07, Doug Cutting <cu...@apache.org> wrote:
>> Bwolen Yang wrote:
>> >>
>> >> During unit test, I get
>> >>     [junit] Exception in thread "main" java.lang.NoSuchMethodError:
>> >> org.apache.tools.ant.util.FileUtils.close(Ljava/io/OutputStream;)V
>>
>> I've never seen this.  What JDK?  What OS?  What version of Hadoop?
> 
> after removing lib/jetty-ext/ant.jar, these warnings disappear (and
> the BUILD is successful).
> 
> I am using ant version 1.7.0, sun jdk1.6.0_01, and head of Hadoop
> source tree (as of 6/14).
> 
> As for OS,
>    Linux 2.6.18-8.1.1.el5 #1, SMP, x86_64
> 
> 
>> > removing
>> >   hadoop-trunk/lib/jetty-ext/ant.jar
>> > seems to have fixed this error.   I am not even sure how the above got
>> > used since it doesn't appear in the classpath when I run "ant -v".
>> >
>> > Out of curiosity, why is there a special ant.jar?
>>
>> It appears to be required by Jetty.
> 
> which version of ant are you guys using?  also which version of
> ant.jar is jetty-ext/ant.jar.
> I can try to downgrade to the "ant" version that is the same.
> 
> bwolen
> 
> 

-- 
View this message in context: http://www.nabble.com/questions-ant-for-building-a-patch-tf3925787.html#a11918735
Sent from the Hadoop Dev mailing list archive at Nabble.com.


Re: questions ant for building a patch

Posted by Bwolen Yang <wb...@gmail.com>.
On 6/15/07, Doug Cutting <cu...@apache.org> wrote:
> Bwolen Yang wrote:
> >>
> >> During unit test, I get
> >>     [junit] Exception in thread "main" java.lang.NoSuchMethodError:
> >> org.apache.tools.ant.util.FileUtils.close(Ljava/io/OutputStream;)V
>
> I've never seen this.  What JDK?  What OS?  What version of Hadoop?

after removing lib/jetty-ext/ant.jar, these warnings disappear (and
the BUILD is successful).

I am using ant version 1.7.0, sun jdk1.6.0_01, and head of Hadoop
source tree (as of 6/14).

As for OS,
   Linux 2.6.18-8.1.1.el5 #1, SMP, x86_64


> > removing
> >   hadoop-trunk/lib/jetty-ext/ant.jar
> > seems to have fixed this error.   I am not even sure how the above got
> > used since it doesn't appear in the classpath when I run "ant -v".
> >
> > Out of curiosity, why is there a special ant.jar?
>
> It appears to be required by Jetty.

which version of ant are you guys using?  also which version of
ant.jar is jetty-ext/ant.jar.
I can try to downgrade to the "ant" version that is the same.

bwolen

Re: questions ant for building a patch

Posted by Owen O'Malley <oo...@yahoo-inc.com>.
On Aug 12, 2007, at 4:06 PM, mfc wrote:

> removing the ant.jar fixed it

I've filed HADOOP-1726 to remove ant.jar from the lib directory.

-- Owen

Re: questions ant for building a patch

Posted by mfc <mi...@verizon.net>.

Doug Cutting wrote:
> 
> 
> I've never seen this.  What JDK?  What OS?  What version of Hadoop?
> 
> 

jdk: 1.5.0_12
ant: 1.7.0 
os: windows XP SP2 & cygwin
hadoop: trunk (8/12/07)

removing the ant.jar fixed it
-- 
View this message in context: http://www.nabble.com/questions-ant-for-building-a-patch-tf3925787.html#a12118791
Sent from the Hadoop Dev mailing list archive at Nabble.com.


Re: questions ant for building a patch

Posted by Doug Cutting <cu...@apache.org>.
Bwolen Yang wrote:
>>
>> During unit test, I get
>>     [junit] Exception in thread "main" java.lang.NoSuchMethodError:
>> org.apache.tools.ant.util.FileUtils.close(Ljava/io/OutputStream;)V

I've never seen this.  What JDK?  What OS?  What version of Hadoop?

> removing
>   hadoop-trunk/lib/jetty-ext/ant.jar
> seems to have fixed this error.   I am not even sure how the above got
> used since it doesn't appear in the classpath when I run "ant -v".
> 
> Out of curiosity, why is there a special ant.jar?

It appears to be required by Jetty.

Doug

Re: questions ant for building a patch

Posted by Bwolen Yang <wb...@gmail.com>.
>
> During unit test, I get
>     [junit] Exception in thread "main" java.lang.NoSuchMethodError:
> org.apache.tools.ant.util.FileUtils.close(Ljava/io/OutputStream;)V
>

removing
   hadoop-trunk/lib/jetty-ext/ant.jar
seems to have fixed this error.   I am not even sure how the above got
used since it doesn't appear in the classpath when I run "ant -v".

Out of curiosity, why is there a special ant.jar?

bwolen