ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Kurley <MKur...@p21.com>
Subject RE: ClassCastException DefaultLogger
Date Wed, 06 Feb 2002 15:56:58 GMT
I tried a simple task that just echo's a message and everything works fine.



-----Original Message-----
From: Stefan Bodewig [mailto:bodewig@apache.org]
Sent: Wednesday, February 06, 2002 10:30 AM
To: ant-user@jakarta.apache.org
Subject: Re: ClassCastException DefaultLogger


On Wed, 6 Feb 2002, Mark Kurley <MKurley@p21.com> wrote:

> java.lang.ClassCastException: org.apache.tools.ant.DefaultLogger
>         at
>         org.apache.tools.ant.taskdefs.Ant.initializeProject(Ant.java:142)

Very strange.

This is line 142 of Ant.java that has become part of Ant 1.4.1:

 
newProject.addBuildListener((BuildListener)listeners.elementAt(i));

As you don't specify a custom logger, DefaultLogger is the very first
element of the listeners collection and it is a BuildListener, I don't
understand where this exception could come from.

Do you get the same exception with some very easy setup that performs
an <ant> task - which you seem to be doing here.

Something like

<project default="call">
  <target name="call">
    <ant dir="." antfile="${ant.file}" target="sub" />
  </target>
  <target name="sub">
    <echo message="I'm there" />
  </target>
</project>

Stefan

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Visit our website at http://www.p21.com/visit 
The information in this e-mail is confidential and may contain legally
privileged information.  It is intended solely for the person or entity to
which it is addressed.  Access to this e-mail by anyone else is
unauthorized. If you are not the intended recipient, any disclosure,
copying, distribution, action taken, or action omitted to be taken in
reliance on it, is prohibited and may be unlawful.  If you received this
e-mail in error, please contact the sender and delete the material from any
computer. 



--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message