ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manuel Mall ...@arcus.com.au>
Subject RE: NoClassDefFoundError exception on when <taskdef> is invoked a second time
Date Thu, 11 Dec 2003 08:54:07 GMT
Antoine,

here is the stack trace (from ant 1.5.4):

file:/home/mm/oscar/build_current/b.xml:37: Could not create task of
type: jasper2 due to java.lang.NoClassDefFoundError
        at org.apache.tools.ant.Project.createTask(Project.java:1139)
        at
org.apache.tools.ant.UnknownElement.makeTask(UnknownElement.java:289)
        at
org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.java:262
)
        at
org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java
:115)
        at org.apache.tools.ant.Task.perform(Task.java:340)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at
org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at
org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at
org.apache.tools.ant.Project.executeTargets(Project.java:1255)
        at org.apache.tools.ant.Main.runBuild(Main.java:609)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)
Caused by: java.lang.NoClassDefFoundError
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructo
rAccessorImpl.java:39)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCo
nstructorAccessorImpl.java:27)
        at
java.lang.reflect.Constructor.newInstance(Constructor.java:274)
        at java.lang.Class.newInstance0(Class.java:308)
        at java.lang.Class.newInstance(Class.java:261)
        at org.apache.tools.ant.Project.createTask(Project.java:1115)
        ... 16 more
--- Nested Exception ---
java.lang.NoClassDefFoundError
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructo
rAccessorImpl.java:39)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCo
nstructorAccessorImpl.java:27)
        at
java.lang.reflect.Constructor.newInstance(Constructor.java:274)
        at java.lang.Class.newInstance0(Class.java:308)
        at java.lang.Class.newInstance(Class.java:261)
        at org.apache.tools.ant.Project.createTask(Project.java:1115)
        at
org.apache.tools.ant.UnknownElement.makeTask(UnknownElement.java:289)
        at
org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.java:262
)
        at
org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java
:115)
        at org.apache.tools.ant.Task.perform(Task.java:340)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at
org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at
org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at
org.apache.tools.ant.Project.executeTargets(Project.java:1255)
        at org.apache.tools.ant.Main.runBuild(Main.java:609)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)

-----Original Message-----
From: Antoine Lévy-Lambert [mailto:antoine@antbuild.com]
...

Can you send the output of ant -verbose (especially the call stack
leading
to the exception).
...

Antoine

-----Urspr√ľngliche Nachricht-----
Von: Manuel Mall [mailto:MM@arcus.com.au]
Gesendet: Donnerstag, 11. Dezember 2003 09:30
An: 'Ant Users List'
Betreff: RE: NoClassDefFoundError exception on when <taskdef> is
invoked
a second time


Philippe,

this is exactly what's puzzling me. How can it be a classpath error
when it works the first time around?

Manuel

-----Original Message-----
From: Philippe Valle [mailto:pvalle@eprocess.fr]
...
This is an classpath error. Check your classpath


Manuel Mall wrote:

>I have a buildfile a.xml which calls b.xml through an <ant> task a
>number of times. b.xml contains a <taskdef> which contains a nested
><classpath..>.
>
>On the first invocation of b.xml through the <ant> task in a.xml
>everything works fine. However, the second time around I get a
>NoClassDefFoundError exception on the <taskdef> in b.xml.
>
>I am not sure what I might be doing wrong here.
>
>Manuel
>
>Some more info:
>===============
>I am using ant 1.5.4..
>
>The abbreviated ant output is:
>...
>jspc: <-- this is the first invocation of b.xml
>     [echo] Precompiling application internet from
>/data01/oscar/internet/htdocs using tomcat in
>/usr/local/jakarta-tomcat
>...
>    [javac] Compiling 103 source files to
>/data01/oscar/internet/htdocs/WEB-INF/src
>...
>jspc:  <-- this is the second invocation of b.xml
>     [echo] Precompiling application intranet from
>/data01/oscar/intranet/htdocs using tomcat in
>/usr/local/jakarta-tomcat
>
>BUILD FAILED
>file:/home/mm/oscar/build_current/b.xml:37: Could not create task of
>type: jasper2 due to java.lang.NoClassDefFoundError
>
>---
>
>The taskdef in b.xml looks like:
>
>        <taskdef classname="org.apache.jasper.JspC" name="jasper2" >
>            <classpath id="jspc.classpath">
>                <pathelement
>location="${java.home}/../lib/tools.jar"/>
>                <fileset dir="${tomcat.home}/bin">
>                    <include name="*.jar"/>
>                </fileset>
>                <fileset dir="${tomcat.home}/server/lib">
>                    <include name="*.jar"/>
>                </fileset>
>                <fileset dir="${tomcat.home}/common/lib">
>                    <include name="*.jar"/>
>                </fileset>
>            </classpath>
>        </taskdef>
>
>---
>
>I also tried using the latest ant 1.6 beta 3 and it fails the
>following error on the second invocation of b.xml:
>
>BUILD FAILED
>/home/mm/oscar/build_current/a.xml:19: Following error occured while
>executing this line
>java.lang.ExceptionInInitializerError
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>
>
>


--
Philippe  VALLE <pvalle@eprocess.fr>
Server Project Manager - e'process
Tel: +33 (0)4 67 13 84 65



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message