ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 12522] New: - taskdef ignores CLASSPATH
Date Wed, 11 Sep 2002 11:46:00 GMT
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=12522>.
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=12522

taskdef ignores CLASSPATH

           Summary: taskdef ignores CLASSPATH
           Product: Ant
           Version: 1.5.1Beta1
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: mkut@umc.com.ua


If optional task specified with <taskdef> is located in CLASSPATH enviroment
variable Ant fails to load class for that task (it throws DefClassNotFound
exception). When I move that class to "$JAVA_HOME/lib/ext" directory Ant is able
to load it but is unable to load "org.apache.tools.ant.Task" class. When I move
ant.jar to "$JAVA_HOME/lib/ext" directory Ant is unable to load classes from
tools.jar, and so on. Despite all that jars are located in the CLASSPATH
variable Ant ignores them somehow. When I use only one core <javadoc> task all
goes smoothly. Here is stacktrace when running Ant with -debug option.

--- Nested Exception ---
java.lang.NoClassDefFoundError: org/apache/tools/ant/Task
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
        at
org.apache.tools.ant.AntClassLoader.findBaseClass(AntClassLoader.java:1102)
        at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:919)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
        at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:230)
        at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:162)
        at
org.apache.tools.ant.helper.ProjectHelperImpl$TaskHandler.finished(ProjectHelperImpl.java:821)
        at
org.apache.tools.ant.helper.ProjectHelperImpl$AbstractHandler.endElement(ProjectHelperImpl.java:300)
        at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
        at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
        at org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(Unknown Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown
Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at
org.apache.tools.ant.helper.ProjectHelperImpl.parse(ProjectHelperImpl.java:155)
        at
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:117)
        at org.apache.tools.ant.Main.runBuild(Main.java:597)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message