DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15018>. 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=15018 taskdef + getResourceAsStream broken ------- Additional Comments From [EMAIL PROTECTED] 2002-12-03 20:24 ------- Well, the mentioned problem (Bug 6606) is unrelated: 1) fop.jar is not in the system classpath. 2) Even if fop.jar would be in the system classpath, the sys classloader would be able to find the resource, since it is in the same archive and thus in the sys classpath as well. The point is, that ant does not set the ContextClassLoader to the AntClassLoader and thus any request from the application itself to a Resource needs to be satisfied by the sys classLoader, which does not know anything about the "extended" classpath. The request can not be satisfied since the request is never delegated to the AntClassLoader since the AntClassLoader is simply not in the chain ... Thus, IMHO, if ant creates a new task (thread), it should set the threads ContextClassLoader to the AntClassLoader, which will find anything in the "extended" classpath, if its delegates (i.e. normally the sys classLoader) can�t find it. As a workaround I did: Thread.currentThread() .setContextClassLoader(FOPTaskStarter.class.getClassLoader()); FOPTaskStarter.class.getClassLoader() results in an AntClassLoader. Doing that everything works as expected. And since ant loads the Task class, it is actually the clean way and the way it should be done. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
