ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremiah Jahn <jerem...@goodinassociates.com>
Subject Re: taskdef and classpath problem with 1.5
Date Wed, 31 Jul 2002 14:05:54 GMT
no matter which way I do it, I get the same error message. I'd prefer to
do this is a way where I don't have to edit a distributed jar file or
store that file in a root owned directory. Here is some of the debug
output. the main errors are the following:

BUILD FAILED
file:/home/jeremiah/temp_judici/judici/build.xml:23: taskdef class
org.apache.catalina.ant.InstallTask cannot be found

followed by:
--- Nested Exception ---
java.lang.NoClassDefFoundError: org/apache/tools/ant/Task


what gets me is the above, org.apache.tools.ant.Task is part of the ant
classes, not the jar that I'm trying to load and access. This makes me
think that somehow the classpath is being reset/changed somehow. 

thanx, 
-jj-



whole debug from errors down:
BUILD FAILED
file:/home/jeremiah/temp_judici/judici/build.xml:23: taskdef class
org.apache.catalina.ant.InstallTask cannot be found
        at
org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:240)
        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.impl.XMLNamespaceBinder.endElement(Unknown
Source)
        at
org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown
Source)
        at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown
Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.handleEndElement(Unknown Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(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)
--- Nested Exception ---
java.lang.NoClassDefFoundError: org/apache/tools/ant/Task
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:509)
        at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:246)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322)
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:509)
        at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:246)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
        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:262)
        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.impl.XMLNamespaceBinder.endElement(Unknown
Source)
        at
org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown
Source)
        at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown
Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.handleEndElement(Unknown Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(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)

Total time: 4 seconds



On Wed, 2002-07-31 at 08:48, Stefan Bodewig wrote:
> On 31 Jul 2002, Jeremiah Jahn <jeremiah@goodinassociates.com> wrote:
> > Ok then, the following is what I would like to work,please let me
> > know what is messed up.
> > 
> >  <taskdef name="install"
> >          classname="org.apache.catalina.ant.InstallTask">
> >     <classpath>
> >       <pathelement location="lib/catalina-ant.jar"/>
> >     </classpath>
> >   </taskdef>
> 
> Does it give you any messages as to why it doesn't work?  Maybe if you
> throw in a little -verbose or -debug?
> 
> before that you had
> 
> > > <taskdef resource="./tasks.properties">
> > >     <classpath>
> > >       <pathelement location="lib/catalina-ant.jar"/>
> > >     </classpath>
> > >   </taskdef>
> 
> and you probably mean
> 
> <taskdef file="tasks.properties">
>   <classpath>
>     <pathelement location="lib/catalina-ant.jar"/>
>   </classpath>
> </taskdef>
> 
> Stefan
> 
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
-- 
pseudo-user on a pseudo-terminal

Mime
View raw message