Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 79079 invoked from network); 7 May 2004 16:19:47 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 7 May 2004 16:19:47 -0000 Received: (qmail 42935 invoked by uid 500); 7 May 2004 16:12:48 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 42892 invoked by uid 500); 7 May 2004 16:12:48 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 42746 invoked from network); 7 May 2004 16:12:46 -0000 Received: from unknown (HELO gwaihir.fuegolabs.com) (200.80.200.100) by daedalus.apache.org with SMTP; 7 May 2004 16:12:46 -0000 Received: from fuegolabs.com (fenix.fuegolabs.com [192.168.1.93]) by gwaihir.fuegolabs.com (Postfix) with ESMTP id 323C9236E4F for ; Fri, 7 May 2004 11:14:27 -0300 (ART) Message-ID: <409B99C3.1040804@fuegolabs.com> Date: Fri, 07 May 2004 11:14:27 -0300 From: Mariano Benitez User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/20040421 X-Accept-Language: en-us, en, es-ar MIME-Version: 1.0 To: Ant Developers List Subject: antlibs and classloaders #2 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I am at the edge of a mental crisis, I need help.... Can someone explain how antlib paths and tasks works, I have this situation that I cannot understand. I defined this: another Jar "fuegocore.jar" is in the classpath manifest of those jars, inside the fuegocore jar there is a clas "Loader". When I am executing one of the tasks in the antlib I do this. Inside an Utils.class static method: task.log("[LOADERS] Loader Class [" + Loader.class.hashCode() + "/" + Loader.class.getClassLoader() + "]"); task.log("[LOADERS] Utils Class [" + Utils.class.hashCode() + "/" + Utils.class.getClassLoader() + "]"); and this is the result I get when I run this multiple times in the same ant run. [t:testsetup] [LOADERS] Loader Class [6597453/java.net.URLClassLoader@affc70] [t:testsetup] [LOADERS] Utils Class [19551658/org.apache.tools.ant.loader.AntClassLoader2@153f67e] [t:testsetup] [LOADERS] Loader Class [6597453/java.net.URLClassLoader@affc70] [t:testsetup] [LOADERS] Utils Class [10520143/org.apache.tools.ant.loader.AntClassLoader2@9a9b65] [t:testsetup] [LOADERS] Loader Class [6597453/java.net.URLClassLoader@affc70] [t:testsetup] [LOADERS] Utils Class [28623319/org.apache.tools.ant.loader.AntClassLoader2@da90c] the thing is: WHY THE LOADER CLASS IS ALWAYS THE SAME WHILE THE UTILS CLASS IS ALWAYS IN DIFFERENT ANT CLASSLOADERS!!! Also, If I put a static {} block in the Loader class it is invoked many times, not only one as it should, being the same class the one being returned. Please help, I cannot understand what is causing this and the side-effect is that I get OutOfMemory errors when I run nightly batch tests. Everything is appreciated. MAriano --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org