Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 5325 invoked from network); 2 Feb 2004 04:59:31 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 2 Feb 2004 04:59:31 -0000 Received: (qmail 70347 invoked by uid 500); 2 Feb 2004 04:59:10 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 70071 invoked by uid 500); 2 Feb 2004 04:59:08 -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 70050 invoked from network); 2 Feb 2004 04:59:08 -0000 Received: from unknown (HELO exchange.sun.com) (192.18.33.10) by daedalus.apache.org with SMTP; 2 Feb 2004 04:59:08 -0000 Received: (qmail 3638 invoked by uid 50); 2 Feb 2004 04:59:33 -0000 Date: 2 Feb 2004 04:59:33 -0000 Message-ID: <20040202045933.3637.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: dev@ant.apache.org Cc: Subject: DO NOT REPLY [Bug 26570] - duplicate instances of interface com.sun.javadoc.RootDoc loaded 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 DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26570 duplicate instances of interface com.sun.javadoc.RootDoc loaded ------- Additional Comments From conor@cortexebusiness.com.au 2004-02-02 04:59 ------- In your custom task, I presume you are using the URLClassLoader constructor without specifying a parent. This causes ClassLoader.java to use the SystemClassLoader. That is probably not what you want - you really want to use your task's classloader as the parent - that way you'll be sure to get the same version of RootDoc. Try changing the URLClassLoader constructor to something like URLClassLoader urlc = new URLClassLoader(new URL[] {url}, getClass().getClassLoader()); In Ant 1.6, the system class loader is fairly empty - just consisting of the JVM itself and the Ant launcher jar. In Ant 1.5.4, everything is in the system class loader. I do find it odd that your custom task could even load your Foo class since I'm not sure how it is finding tools.jar (which contains RootDoc) when it only uses the system loader and your FooStuff.jar. The above change should work in both Ant 1.5.4 and Ant 1.6 BTW, you should not need ant.jar in your classpath. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org