PLEASE DO NOT REPLY TO THIS MESSAGE. TO FURTHER COMMENT ON THE STATUS OF THIS BUG PLEASE FOLLOW THE LINK BELOW AND USE THE ON-LINE APPLICATION. REPLYING TO THIS MESSAGE DOES NOT UPDATE THE DATABASE, AND SO YOUR COMMENT WILL BE LOST SOMEWHERE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3158 *** shadow/3158 Tue Aug 21 07:33:25 2001 --- shadow/3158.tmp.27806 Mon Aug 27 07:06:59 2001 *************** *** 2,9 **** | "java" task has got problems with loading classes | +----------------------------------------------------------------------------+ | Bug #: 3158 Product: Ant | ! | Status: NEW Version: 1.4Beta1 | ! | Resolution: Platform: PC | | Severity: Normal OS/Version: Windows NT/2K | | Priority: Other Component: Core tasks | +----------------------------------------------------------------------------+ --- 2,9 ---- | "java" task has got problems with loading classes | +----------------------------------------------------------------------------+ | Bug #: 3158 Product: Ant | ! | Status: RESOLVED Version: 1.4Beta1 | ! | Resolution: FIXED Platform: PC | | Severity: Normal OS/Version: Windows NT/2K | | Priority: Other Component: Core tasks | +----------------------------------------------------------------------------+ *************** *** 31,33 **** --- 31,57 ---- ------- Additional Comments From [EMAIL PROTECTED] 2001-08-21 07:33 ------- Created an attachment (id=434) demonstration of the (maybe) bug + + + ------- Additional Comments From [EMAIL PROTECTED] 2001-08-27 07:06 ------- + I have improved the error reporting in the classloader for this but ultimately + this bug comes from the interaction of the classloader and the fact that the VM + now includes many classes from outside the java/javax namespaces. The error now + reported is this + + java.lang.NoClassDefFoundError: org/xml/sax/helpers/DefaultHandler + at java.lang.ClassLoader.defineClass0(Native Method) + + Ant's classloader for <java> tasks tries to minimize the chance of Linkage + errors by only allowing java.* classes to be loaded from the parent + classloader. Thus when your class tries to load + org.xml.sax.helpers.DefaultHandler, Ant's loader says no and tries to resolve + the class in the classpath it has been given. + + That hueristic is OK under JDK 1.3 for most cases (CORBA maybe an exception), + but is going to breakdown under JDK 1.4 for a larger number of situations (XML + parsing). + + This will require more thought since it affects the whole classloading strategy + which needs to be redesigned to more cleanly separate the classes available to + the Ant core, the tasks, and tasks like <java>, while avoiding linkage errors.
