Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 97617 invoked from network); 7 Aug 2006 13:03:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Aug 2006 13:03:07 -0000 Received: (qmail 61369 invoked by uid 500); 7 Aug 2006 13:03:02 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 61336 invoked by uid 500); 7 Aug 2006 13:03:02 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 61325 invoked by uid 99); 7 Aug 2006 13:03:02 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Aug 2006 06:03:02 -0700 X-ASF-Spam-Status: No, hits=3.0 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,DNS_FROM_RFC_WHOIS,FROM_HAS_ULINE_NUMS,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [216.252.111.116] (HELO web57103.mail.re3.yahoo.com) (216.252.111.116) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 07 Aug 2006 06:03:01 -0700 Received: (qmail 10242 invoked by uid 60001); 7 Aug 2006 13:02:40 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=XwX15wEam8/DGzG8euOyo+GYw7g0JoWkjw/XBu5kbMY7sc1m+3huz0XEhjF6Ogcd8A3wlCRJU+wfv8rAsc9qcjGjO3088o8A33/QAmcr6PunBWIN9pPCxCXrcpcn9ZJEX9onPnuDmC8ZmUTcPgdl7/tNazedzfNQH49t26KSbQw= ; Message-ID: <20060807130240.10240.qmail@web57103.mail.re3.yahoo.com> Received: from [64.73.137.59] by web57103.mail.re3.yahoo.com via HTTP; Mon, 07 Aug 2006 06:02:40 PDT Date: Mon, 7 Aug 2006 06:02:40 -0700 (PDT) From: Public Id Subject: ClassCastException in MacroInstance (Apache Ant version 1.6.5 compiled on June 2 2005) To: user@ant.apache.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1836835018-1154955760=:93012" Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --0-1836835018-1154955760=:93012 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit I am getting a ClassCastException from MacroInstance. This is the actual callstack I get: C:\dev\workspace\proj\build.xml:70: org.apache.bsf.BSFException: The application script threw an exception: The following error occurred while executing this line: C:\dev\workspace\proj\build.xml:21: The following error occurred while executing this line: C:\dev\workspace\proj\build-common.xml:341: The following error occurred while executing this line: C:\dev\workspace\proj\build-common.xml:365: java.lang.ClassCastException BSF info: ANT at line: 0 column: columnNo I've debugged this to MacroInstance.java, line 273: UnknownElement unknownElement = (UnknownElement) r.getProxy(); What is happening is that r.getProxy() is actually returning a FileSet, hence the exception. Here's what's odd: I am getting this exception when I try to use beanshell with the script task to create a subant task and perform it, passing in a Filelist. I've got an existing target which does the exact same thing as the subant task I'm trying to create but with a larger Filelist. When I run invoke that target directly, everything works just fine. Here's the excerpt which creates the task: fl = project.createDataType("filelist"); fl.setDir( new File("..") ); fl.setFiles( sb.toString() ); task = project.createTask( "subant" ); task.setTaskName( "build-continuing" ); task.setTaskType( "build-continuing" ); task.setTarget( "all" ); task.setVerbose( true ); task.addFilelist( fl ); task.perform(); Is there something else I need to do? Any thoughts as to what could cause this? Is this a question better suited for the dev list? Thanks, : jay __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --0-1836835018-1154955760=:93012--