Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 42779 invoked from network); 5 Mar 2010 13:34:25 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 5 Mar 2010 13:34:25 -0000 Received: (qmail 53832 invoked by uid 500); 5 Mar 2010 13:34:10 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 53706 invoked by uid 500); 5 Mar 2010 13:34:10 -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 19523 invoked by uid 99); 5 Mar 2010 13:12:11 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of remko.troncon@gmail.com designates 74.125.78.148 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=EQQCD8gVzJE0WMHD0XhgYeB3zHSgVCfCKX7/cjVqPU8=; b=A32Nnia8Hs3FFx47j6pmuox3FlfBLTf/eCFg/gmvN9qsv8AWRgtSy87FtGRTgOnfob iLM3QIBLgOW0FaKoj4Xykd/3TSNAjcE/1GM1WZsDoO1PVsRrM7blzF7/UqGFIY+be6DG QG7O/PkKsu3c7vp77Io5ghfXO8+fSEwGe9TFo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=o9A866UWPW0AXu4/zn+WN3GGPx93+SLfAznE4hf44JeocDkpms4/arMr6XTCrzOzeC jY422/6WUpXHuNz7I6l+IngbJ08dyN8B6cfzF9Ko2iM7j/r5peCiOgISrSh3Pzgem7Lg WeLjoxn2KBq0MwJZhk5f44h3npuo8AHrFnGxo= MIME-Version: 1.0 Sender: remko.troncon@gmail.com Date: Fri, 5 Mar 2010 14:11:49 +0100 X-Google-Sender-Auth: f418e05595c6507b Message-ID: <133fd4c61003050511kd90d46bp9d4dda5d1171a79@mail.gmail.com> Subject: JAXP & Classloading From: =?UTF-8?Q?Remko_Tron=C3=A7on?= To: user@ant.apache.org Content-Type: text/plain; charset=UTF-8 Hi, I have the following task: import org.apache.tools.ant.Task; import javax.xml.parsers.SAXParserFactory; public class FooTask extends Task { public void execute() { System.setProperty("javax.xml.parsers.SAXParserFactory", getClass().getCanonicalName()); SAXParserFactory f = SAXParserFactory.newInstance(); } } and a build file containing the following: When I run the foo task, I get the following error: javax.xml.parsers.FactoryConfigurationError: Provider FooTask not found However, when I run with "-lib ." everything runs as expected. This feels like a problem with the classloader not being able to load the class specified in the string (maybe related to the JUnit problem in the FAQ perhaps?). What is the best way to solve this problem elegantly? (i.e. how do I make sure that JAXP finds my class?). I'm using ant 1.7. thanks, Remko --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org