ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Huang, Daniel" <dhu...@InterAdNet.com>
Subject taskdef class ... not found
Date Fri, 05 Jan 2001 01:49:12 GMT
Hi there,

I just installed Ant1.2 under JDK1.3, JAXP 1.0.1, and Window NT 4.0. I
created my own taskdef with Ant_sqlj.java. I could not run ant when I put my
java class in a package: com.myDomain.myAntTask. I have error:

E:\tmp\build.xml:4: taskdef class com.myDomain.myAntTask.Ant_sqlj cannot be
found
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.taskdefs.Taskdef.execute(Taskdef.java:111)
        at
org.apache.tools.ant.ProjectHelper$TaskHandler.init(ProjectHelper.java:417)
        at
org.apache.tools.ant.ProjectHelper$ProjectHandler.handleTaskdef(ProjectHelpe
r.java:292)
        at
org.apache.tools.ant.ProjectHelper$ProjectHandler.startElement(ProjectHelper
.java:279)
        at com.sun.xml.parser.Parser.maybeElement(Parser.java:1391)
        at com.sun.xml.parser.Parser.content(Parser.java:1499)
        at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
        at com.sun.xml.parser.Parser.parseInternal(Parser.java:492)
        at com.sun.xml.parser.Parser.parse(Parser.java:284)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:126)
        at org.apache.tools.ant.ProjectHelper.parse(ProjectHelper.java:104)
        at
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:85)
        at org.apache.tools.ant.Main.runBuild(Main.java:402)
        at org.apache.tools.ant.Main.main(Main.java:149)

Total time: 0 seconds

I could see the class when I run

	javap com.myDomain.myAntTask.Ant_sqlj 

However, when I removed the package name, I could run ant.

Any help appreciated.

Daniel Huang

Mime
View raw message