You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Mikhail Loenko <ml...@gmail.com> on 2006/11/28 12:14:38 UTC

[alert] "ant rebuild" is broken

-compile:
    [mkdir] Created dir: C:\WS\Experiments\build\classes
    [javac] Compiling 3589 source files to C:\WS\Experiments\build\classes
    [javac] ----------
    [javac] 1. ERROR in C:\WS\Experiments\modules\luni\src\main\java\java\util\P
roperties.java
    [javac]  (at line 571)
    [javac]     String value = entry.getTextContent();
    [javac]                          ^^^^^^^^^^^^^^
    [javac] The method getTextContent() is undefined for the type Element
    [javac] ----------
    [javac] 1 problem (1 error)

BUILD FAILED
C:\WS\Experiments\build.xml:113: The following error occurred while executing th
is line:
C:\WS\Experiments\make\build-java.xml:126: Compile failed; see the compiler erro
r output for details.


I see this on WinXP
anyone else is seeing that?

Re: [alert] "ant rebuild" is broken

Posted by Mikhail Loenko <ml...@gmail.com>.
Done in r480003

2006/11/28, Mikhail Loenko <ml...@gmail.com>:
> That solves the problem. Let's roll back that change and analyze what happened.
> Comments?
>
> 2006/11/28, Stepan Mishura <st...@gmail.com>:
> > On 11/28/06, Mikhail Loenko wrote:
> > >
> > > I switched to 5.0 it did not help
> >
> >
> > Try: svn up -r479516 make/build-java.xml
> >
> > -Stepan.
> >
> > 2006/11/28, Mikhail Loenko <ml...@gmail.com>:
> > > > This is probably because I run ant on Java 1.4. Some time ago we allowed
> > > that
> > > > did our policy changed or that was an unintentional change?
> > > >
> > > > 2006/11/28, Stepan Mishura <st...@gmail.com>:
> > > > > On 11/28/06, Mikhail Loenko wrote:
> > > > > >
> > > > > > -compile:
> > > > > >    [mkdir] Created dir: C:\WS\Experiments\build\classes
> > > > > >    [javac] Compiling 3589 source files to
> > > C:\WS\Experiments\build\classes
> > > > > >    [javac] ----------
> > > > > >    [javac] 1. ERROR in
> > > > > > C:\WS\Experiments\modules\luni\src\main\java\java\util\P
> > > > > > roperties.java
> > > > > >    [javac]  (at line 571)
> > > > > >    [javac]     String value = entry.getTextContent();
> > > > > >    [javac]                          ^^^^^^^^^^^^^^
> > > > > >    [javac] The method getTextContent() is undefined for the type
> > > Element
> > > > > >    [javac] ----------
> > > > > >    [javac] 1 problem (1 error)
> > > > > >
> > > > > > BUILD FAILED
> > > > > > C:\WS\Experiments\build.xml:113: The following error occurred while
> > > > > > executing th
> > > > > > is line:
> > > > > > C:\WS\Experiments\make\build-java.xml:126: Compile failed; see the
> > > > > > compiler erro
> > > > > > r output for details.
> > > > > >
> > > > > >
> > > > > > I see this on WinXP
> > > > > > anyone else is seeing that?
> > > > > >
> > > > >
> > > > > Yes, I see the same error message on Linux too.
> > > > >
> > > > > Thanks,
> > > > > Stepan
> > > > >
> > > > >
> > > >
> > >
> >
> >
>

Re: [alert] "ant rebuild" is broken

Posted by Tim Ellison <t....@gmail.com>.
Mikhail Loenko wrote:
> how about this:
> 
> @@ -108,7 +108,7 @@
>     <!-- =================================
>           target: -compile
>          ================================= -->
> -    <target name="-compile" depends="-prepare-depends">
> +    <target name="-compile" depends="-prepare-depends, -layout">
> @@ -168,10 +167,19 @@
>             <src path="modules/x-net/src/main/java/" />
> 
>             <classpath>
> -                <fileset dir="${depends.jars}">
> +                <fileset dir="${hy.jdk}/jre/lib/boot">
>                     <include name="**/*.jar" />
>                 </fileset>
> 
> 
> We do copying first. As a result we don't have to mantain one more list

Yep, that will fix it right.

Aesthetically it would be good to get rid of this fileset from -layout:
  ...
  <fileset dir="${depends.jars}">
    <patternset includes="*.jar" />
    <patternset includes="xerces_2.8.0/*.jar" />
    <patternset includes="xalan-j_2.7.0/*.jar" />
    <patternset includes="icu4j_3.4.4/*.jar" />
    <patternset includes="mx4j_3.0.1/*.jar" />
    <patternset includes="yoko_M1-20061027/*.jar" />
    <patternset includes="bcel-5.2/*.jar" />
  </fileset>
  ...

and make it a refid, defined in the depends file, so updates to the
dependencies are localized.

Regards,
Tim

-- 

Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.

Re: [alert] "ant rebuild" is broken

Posted by Mikhail Loenko <ml...@gmail.com>.
committed in r480026

2006/11/28, Mikhail Loenko <ml...@gmail.com>:
> how about this:
>
> @@ -108,7 +108,7 @@
>     <!-- =================================
>           target: -compile
>          ================================= -->
> -    <target name="-compile" depends="-prepare-depends">
> +    <target name="-compile" depends="-prepare-depends, -layout">
> @@ -168,10 +167,19 @@
>             <src path="modules/x-net/src/main/java/" />
>
>             <classpath>
> -                <fileset dir="${depends.jars}">
> +                <fileset dir="${hy.jdk}/jre/lib/boot">
>                     <include name="**/*.jar" />
>                 </fileset>
>
>
> We do copying first. As a result we don't have to mantain one more list
>
> 2006/11/28, Mikhail Loenko <ml...@gmail.com>:
> > 2006/11/28, Tim Ellison <t....@gmail.com>:
> > > Mikhail Loenko wrote:
> > > > classpath has both xerces 2.6.2 and xerces 2.8.0. 2.6.2 goes first.
> > > >
> > > > If I remove 2.6.2 from depends it builds OK. I noticed that there are
> > > > also other
> > > > old versions of depends that are still there. How do we handle them?
> > >
> > > ah ha.  Yeah, good point.  At the moment we take 'depends/**/*.jar' onto
> > > the classpath, and when we update versions we don't explicitly require
> > > people to delete the older versions.
> > >
> > > The fix is to list the dependencies that we have in a fileset, rather
> > > than picking up all the JARs.  It means there is one more place to
> > > update when we have a new dependency, but at least it is explicit I guess.
> > >
> > > So I'm guessing that the roll-back fixed things for you because that is
> > > now picking up the 'wrong' JRE JARs again, which happen to have the JARs
> > > you need!  So can you please put back the fixed build-java.xml?
> >
> > OK, sure
> >
> >
> > >
> > > Thanks
> > > Tim
> > >
> > > --
> > >
> > > Tim Ellison (t.p.ellison@gmail.com)
> > > IBM Java technology centre, UK.
> > >
> >
>

Re: [alert] "ant rebuild" is broken

Posted by Mikhail Loenko <ml...@gmail.com>.
how about this:

@@ -108,7 +108,7 @@
     <!-- =================================
           target: -compile
          ================================= -->
-    <target name="-compile" depends="-prepare-depends">
+    <target name="-compile" depends="-prepare-depends, -layout">
@@ -168,10 +167,19 @@
             <src path="modules/x-net/src/main/java/" />

             <classpath>
-                <fileset dir="${depends.jars}">
+                <fileset dir="${hy.jdk}/jre/lib/boot">
                     <include name="**/*.jar" />
                 </fileset>


We do copying first. As a result we don't have to mantain one more list

2006/11/28, Mikhail Loenko <ml...@gmail.com>:
> 2006/11/28, Tim Ellison <t....@gmail.com>:
> > Mikhail Loenko wrote:
> > > classpath has both xerces 2.6.2 and xerces 2.8.0. 2.6.2 goes first.
> > >
> > > If I remove 2.6.2 from depends it builds OK. I noticed that there are
> > > also other
> > > old versions of depends that are still there. How do we handle them?
> >
> > ah ha.  Yeah, good point.  At the moment we take 'depends/**/*.jar' onto
> > the classpath, and when we update versions we don't explicitly require
> > people to delete the older versions.
> >
> > The fix is to list the dependencies that we have in a fileset, rather
> > than picking up all the JARs.  It means there is one more place to
> > update when we have a new dependency, but at least it is explicit I guess.
> >
> > So I'm guessing that the roll-back fixed things for you because that is
> > now picking up the 'wrong' JRE JARs again, which happen to have the JARs
> > you need!  So can you please put back the fixed build-java.xml?
>
> OK, sure
>
>
> >
> > Thanks
> > Tim
> >
> > --
> >
> > Tim Ellison (t.p.ellison@gmail.com)
> > IBM Java technology centre, UK.
> >
>

Re: [alert] "ant rebuild" is broken

Posted by Mikhail Loenko <ml...@gmail.com>.
2006/11/28, Tim Ellison <t....@gmail.com>:
> Mikhail Loenko wrote:
> > classpath has both xerces 2.6.2 and xerces 2.8.0. 2.6.2 goes first.
> >
> > If I remove 2.6.2 from depends it builds OK. I noticed that there are
> > also other
> > old versions of depends that are still there. How do we handle them?
>
> ah ha.  Yeah, good point.  At the moment we take 'depends/**/*.jar' onto
> the classpath, and when we update versions we don't explicitly require
> people to delete the older versions.
>
> The fix is to list the dependencies that we have in a fileset, rather
> than picking up all the JARs.  It means there is one more place to
> update when we have a new dependency, but at least it is explicit I guess.
>
> So I'm guessing that the roll-back fixed things for you because that is
> now picking up the 'wrong' JRE JARs again, which happen to have the JARs
> you need!  So can you please put back the fixed build-java.xml?

OK, sure


>
> Thanks
> Tim
>
> --
>
> Tim Ellison (t.p.ellison@gmail.com)
> IBM Java technology centre, UK.
>

Re: [alert] "ant rebuild" is broken

Posted by Tim Ellison <t....@gmail.com>.
Mikhail Loenko wrote:
> classpath has both xerces 2.6.2 and xerces 2.8.0. 2.6.2 goes first.
> 
> If I remove 2.6.2 from depends it builds OK. I noticed that there are
> also other
> old versions of depends that are still there. How do we handle them?

ah ha.  Yeah, good point.  At the moment we take 'depends/**/*.jar' onto
the classpath, and when we update versions we don't explicitly require
people to delete the older versions.

The fix is to list the dependencies that we have in a fileset, rather
than picking up all the JARs.  It means there is one more place to
update when we have a new dependency, but at least it is explicit I guess.

So I'm guessing that the roll-back fixed things for you because that is
now picking up the 'wrong' JRE JARs again, which happen to have the JARs
you need!  So can you please put back the fixed build-java.xml?

Thanks
Tim

-- 

Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.

Re: [alert] "ant rebuild" is broken

Posted by Mikhail Loenko <ml...@gmail.com>.
classpath has both xerces 2.6.2 and xerces 2.8.0. 2.6.2 goes first.

If I remove 2.6.2 from depends it builds OK. I noticed that there are
also other
old versions of depends that are still there. How do we handle them?

Thanks,
Mikhail

2006/11/28, Tim Ellison <t....@gmail.com>:
> Mikhail Loenko wrote:
> > That solves the problem. Let's roll back that change and analyze what
> > happened.
> > Comments?
>
> That was my fix for the broken incremental build problem.
> I am also running on WinXP, and needless to say that I didn't have the
> problem you reported.
>
> Can you touch a java file and run "ant -v build-java", then look at the
> compiler command line to see if it looks reasonable to you?
>
> The problem was that the compiler launch line was including the JARs of
> the JRE that is running Ant, so we were compiling against the RI, and
> not Harmony code.
>
> Thanks
> Tim
>
> --
>
> Tim Ellison (t.p.ellison@gmail.com)
> IBM Java technology centre, UK.
>

Re: [alert] "ant rebuild" is broken

Posted by Tim Ellison <t....@gmail.com>.
Mikhail Loenko wrote:
> That solves the problem. Let's roll back that change and analyze what
> happened.
> Comments?

That was my fix for the broken incremental build problem.
I am also running on WinXP, and needless to say that I didn't have the
problem you reported.

Can you touch a java file and run "ant -v build-java", then look at the
compiler command line to see if it looks reasonable to you?

The problem was that the compiler launch line was including the JARs of
the JRE that is running Ant, so we were compiling against the RI, and
not Harmony code.

Thanks
Tim

-- 

Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.

Re: [alert] "ant rebuild" is broken

Posted by Mikhail Loenko <ml...@gmail.com>.
That solves the problem. Let's roll back that change and analyze what happened.
Comments?

2006/11/28, Stepan Mishura <st...@gmail.com>:
> On 11/28/06, Mikhail Loenko wrote:
> >
> > I switched to 5.0 it did not help
>
>
> Try: svn up -r479516 make/build-java.xml
>
> -Stepan.
>
> 2006/11/28, Mikhail Loenko <ml...@gmail.com>:
> > > This is probably because I run ant on Java 1.4. Some time ago we allowed
> > that
> > > did our policy changed or that was an unintentional change?
> > >
> > > 2006/11/28, Stepan Mishura <st...@gmail.com>:
> > > > On 11/28/06, Mikhail Loenko wrote:
> > > > >
> > > > > -compile:
> > > > >    [mkdir] Created dir: C:\WS\Experiments\build\classes
> > > > >    [javac] Compiling 3589 source files to
> > C:\WS\Experiments\build\classes
> > > > >    [javac] ----------
> > > > >    [javac] 1. ERROR in
> > > > > C:\WS\Experiments\modules\luni\src\main\java\java\util\P
> > > > > roperties.java
> > > > >    [javac]  (at line 571)
> > > > >    [javac]     String value = entry.getTextContent();
> > > > >    [javac]                          ^^^^^^^^^^^^^^
> > > > >    [javac] The method getTextContent() is undefined for the type
> > Element
> > > > >    [javac] ----------
> > > > >    [javac] 1 problem (1 error)
> > > > >
> > > > > BUILD FAILED
> > > > > C:\WS\Experiments\build.xml:113: The following error occurred while
> > > > > executing th
> > > > > is line:
> > > > > C:\WS\Experiments\make\build-java.xml:126: Compile failed; see the
> > > > > compiler erro
> > > > > r output for details.
> > > > >
> > > > >
> > > > > I see this on WinXP
> > > > > anyone else is seeing that?
> > > > >
> > > >
> > > > Yes, I see the same error message on Linux too.
> > > >
> > > > Thanks,
> > > > Stepan
> > > >
> > > >
> > >
> >
>
>

Re: [alert] "ant rebuild" is broken

Posted by Stepan Mishura <st...@gmail.com>.
On 11/28/06, Mikhail Loenko wrote:
>
> I switched to 5.0 it did not help


Try: svn up -r479516 make/build-java.xml

-Stepan.

2006/11/28, Mikhail Loenko <ml...@gmail.com>:
> > This is probably because I run ant on Java 1.4. Some time ago we allowed
> that
> > did our policy changed or that was an unintentional change?
> >
> > 2006/11/28, Stepan Mishura <st...@gmail.com>:
> > > On 11/28/06, Mikhail Loenko wrote:
> > > >
> > > > -compile:
> > > >    [mkdir] Created dir: C:\WS\Experiments\build\classes
> > > >    [javac] Compiling 3589 source files to
> C:\WS\Experiments\build\classes
> > > >    [javac] ----------
> > > >    [javac] 1. ERROR in
> > > > C:\WS\Experiments\modules\luni\src\main\java\java\util\P
> > > > roperties.java
> > > >    [javac]  (at line 571)
> > > >    [javac]     String value = entry.getTextContent();
> > > >    [javac]                          ^^^^^^^^^^^^^^
> > > >    [javac] The method getTextContent() is undefined for the type
> Element
> > > >    [javac] ----------
> > > >    [javac] 1 problem (1 error)
> > > >
> > > > BUILD FAILED
> > > > C:\WS\Experiments\build.xml:113: The following error occurred while
> > > > executing th
> > > > is line:
> > > > C:\WS\Experiments\make\build-java.xml:126: Compile failed; see the
> > > > compiler erro
> > > > r output for details.
> > > >
> > > >
> > > > I see this on WinXP
> > > > anyone else is seeing that?
> > > >
> > >
> > > Yes, I see the same error message on Linux too.
> > >
> > > Thanks,
> > > Stepan
> > >
> > >
> >
>

Re: [alert] "ant rebuild" is broken

Posted by Mikhail Loenko <ml...@gmail.com>.
I switched to 5.0 it did not help

2006/11/28, Mikhail Loenko <ml...@gmail.com>:
> This is probably because I run ant on Java 1.4. Some time ago we allowed that
> did our policy changed or that was an unintentional change?
>
> 2006/11/28, Stepan Mishura <st...@gmail.com>:
> > On 11/28/06, Mikhail Loenko wrote:
> > >
> > > -compile:
> > >    [mkdir] Created dir: C:\WS\Experiments\build\classes
> > >    [javac] Compiling 3589 source files to C:\WS\Experiments\build\classes
> > >    [javac] ----------
> > >    [javac] 1. ERROR in
> > > C:\WS\Experiments\modules\luni\src\main\java\java\util\P
> > > roperties.java
> > >    [javac]  (at line 571)
> > >    [javac]     String value = entry.getTextContent();
> > >    [javac]                          ^^^^^^^^^^^^^^
> > >    [javac] The method getTextContent() is undefined for the type Element
> > >    [javac] ----------
> > >    [javac] 1 problem (1 error)
> > >
> > > BUILD FAILED
> > > C:\WS\Experiments\build.xml:113: The following error occurred while
> > > executing th
> > > is line:
> > > C:\WS\Experiments\make\build-java.xml:126: Compile failed; see the
> > > compiler erro
> > > r output for details.
> > >
> > >
> > > I see this on WinXP
> > > anyone else is seeing that?
> > >
> >
> > Yes, I see the same error message on Linux too.
> >
> > Thanks,
> > Stepan
> >
> >
>

Re: [alert] "ant rebuild" is broken

Posted by Mikhail Loenko <ml...@gmail.com>.
This is probably because I run ant on Java 1.4. Some time ago we allowed that
did our policy changed or that was an unintentional change?

2006/11/28, Stepan Mishura <st...@gmail.com>:
> On 11/28/06, Mikhail Loenko wrote:
> >
> > -compile:
> >    [mkdir] Created dir: C:\WS\Experiments\build\classes
> >    [javac] Compiling 3589 source files to C:\WS\Experiments\build\classes
> >    [javac] ----------
> >    [javac] 1. ERROR in
> > C:\WS\Experiments\modules\luni\src\main\java\java\util\P
> > roperties.java
> >    [javac]  (at line 571)
> >    [javac]     String value = entry.getTextContent();
> >    [javac]                          ^^^^^^^^^^^^^^
> >    [javac] The method getTextContent() is undefined for the type Element
> >    [javac] ----------
> >    [javac] 1 problem (1 error)
> >
> > BUILD FAILED
> > C:\WS\Experiments\build.xml:113: The following error occurred while
> > executing th
> > is line:
> > C:\WS\Experiments\make\build-java.xml:126: Compile failed; see the
> > compiler erro
> > r output for details.
> >
> >
> > I see this on WinXP
> > anyone else is seeing that?
> >
>
> Yes, I see the same error message on Linux too.
>
> Thanks,
> Stepan
>
>

Re: [alert] "ant rebuild" is broken

Posted by Stepan Mishura <st...@gmail.com>.
On 11/28/06, Mikhail Loenko wrote:
>
> -compile:
>    [mkdir] Created dir: C:\WS\Experiments\build\classes
>    [javac] Compiling 3589 source files to C:\WS\Experiments\build\classes
>    [javac] ----------
>    [javac] 1. ERROR in
> C:\WS\Experiments\modules\luni\src\main\java\java\util\P
> roperties.java
>    [javac]  (at line 571)
>    [javac]     String value = entry.getTextContent();
>    [javac]                          ^^^^^^^^^^^^^^
>    [javac] The method getTextContent() is undefined for the type Element
>    [javac] ----------
>    [javac] 1 problem (1 error)
>
> BUILD FAILED
> C:\WS\Experiments\build.xml:113: The following error occurred while
> executing th
> is line:
> C:\WS\Experiments\make\build-java.xml:126: Compile failed; see the
> compiler erro
> r output for details.
>
>
> I see this on WinXP
> anyone else is seeing that?
>

Yes, I see the same error message on Linux too.

Thanks,
Stepan

Re: [alert] "ant rebuild" is broken

Posted by Tim Ellison <t....@gmail.com>.
Mikhail Loenko wrote:
> -compile:
>    [mkdir] Created dir: C:\WS\Experiments\build\classes
>    [javac] Compiling 3589 source files to C:\WS\Experiments\build\classes
>    [javac] ----------
>    [javac] 1. ERROR in
> C:\WS\Experiments\modules\luni\src\main\java\java\util\P
> roperties.java
>    [javac]  (at line 571)
>    [javac]     String value = entry.getTextContent();
>    [javac]                          ^^^^^^^^^^^^^^
>    [javac] The method getTextContent() is undefined for the type Element
>    [javac] ----------
>    [javac] 1 problem (1 error)

As discussed, can you take a look and see which JARs you are compiling
against?

I would expect to see this method come from the org.w3c.dom.Node type in
depends\jars\xerces_2.8.0\xml-apis.jar

The method Node#getTextContent() only appeared in DOM Level 3 (i.e. JSE
5.0).  Is it possible that you are compiling against a 1.4 JRE and not
picking up the Harmony dependencies?

Regards,
Tim

-- 

Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.