The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

manasi (1) [Avatar] Offline
#1
Hi,
This is an exception i get when i execute maven testapp.testapp is a goal ive written to execute a cactus test case.
I've included junit.jar in ${user_home}/.ant/lib .I'm using junit-3.8.1.jar and ant1.7.0.
The taskdef in maven.xml looks like this :
<taskdef resource="cactus.tasks">
<classpath>
<pathelement location="C:/supplierjars/cactus-ant-1.7.2.jar"/>
<pathelement location="C:/supplierjars/cactus-1.7.2.jar"/>
<pathelement location="C:/supplierjars/junit-3.8.1.jar"/>
<pathelement location="C:/supplierjars/commons-logging-1.0.4.jar"/>
<pathelement location="C:/supplierjars/commons-httpclient-2.0.jar"/>
<pathelement location="C:/supplierjars/aspectjrt-1.2.1.jar"/>
</classpath>
</taskdef>
I would like to know if I've missed out on any step? I think my junit is not present in ant classpath, but ive added junit to ${user_home}/.ant/lib.

org.apache.commons.jelly.JellyTagException: C:supplier-portalsrc.. estmaven
.xml:6:36: <taskdef> taskdef class org.apache.cactus.integration.ant.CactusTask
cannot be found
at org.apache.commons.jelly.impl.TagScript.handleException(TagScript.jav
a:683)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:28smilie
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
at com.werken.werkz.jelly.ProjectTag.doTag(ProjectTag.java:112)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.maven.plugin.PluginManager.runScript(PluginManager.java:11
43)
at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:
647)
at org.apache.maven.MavenSession.attainGoals(MavenSession.java:263)
at org.apache.maven.jelly.tags.maven.MavenTag.doTag(MavenTag.java:82)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoalTa
g.java:79)
at org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.perfor
mAction(MavenGoalTag.java:110)
at com.werken.werkz.Goal.fire(Goal.java:639)
at com.werken.werkz.Goal.attain(Goal.java:575)
at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:
671)
at org.apache.maven.MavenSession.attainGoals(MavenSession.java:263)
at org.apache.maven.cli.App.doMain(App.java:48smilie
at org.apache.maven.cli.App.main(App.java:1239)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.werken.forehead.Forehead.run(Forehead.java:551)
at com.werken.forehead.Forehead.main(Forehead.java:581)
Caused by: taskdef class org.apache.cactus.integration.ant.CactusTask cannot be
found
at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:240)

at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:20smilie
at org.apache.tools.ant.Task.perform(Task.java:341)
at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:185)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
... 24 more
Caused by: java.lang.NoClassDefFoundError: junit/framework/TestListener
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
at java.lang.Class.getDeclaredConstructors(Class.java:180smilie
at org.apache.tools.ant.AntClassLoader.initializeClass(AntClassLoader.ja
va:484)
at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:231)

... 28 more
Root cause
taskdef class org.apache.cactus.integration.ant.CactusTask cannot be found
at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:240)

at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:20smilie
at org.apache.tools.ant.Task.perform(Task.java:341)
at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:185)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
at com.werken.werkz.jelly.ProjectTag.doTag(ProjectTag.java:112)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.maven.plugin.PluginManager.runScript(PluginManager.java:11
43)
at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:
647)
at org.apache.maven.MavenSession.attainGoals(MavenSession.java:263)
at org.apache.maven.jelly.tags.maven.MavenTag.doTag(MavenTag.java:82)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoalTa
g.java:79)
at org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.perfor
mAction(MavenGoalTag.java:110)
at com.werken.werkz.Goal.fire(Goal.java:639)
at com.werken.werkz.Goal.attain(Goal.java:575)
at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:
671)
at org.apache.maven.MavenSession.attainGoals(MavenSession.java:263)
at org.apache.maven.cli.App.doMain(App.java:48smilie
at org.apache.maven.cli.App.main(App.java:1239)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.werken.forehead.Forehead.run(Forehead.java:551)
at com.werken.forehead.Forehead.main(Forehead.java:581)
Caused by: java.lang.NoClassDefFoundError: junit/framework/TestListener
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
at java.lang.Class.getDeclaredConstructors(Class.java:180smilie
at org.apache.tools.ant.AntClassLoader.initializeClass(AntClassLoader.ja
va:484)
at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:231)

... 28 more
--- Nested Exception ---
java.lang.NoClassDefFoundError: junit/framework/TestListener
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
at java.lang.Class.getDeclaredConstructors(Class.java:180smilie
at org.apache.tools.ant.AntClassLoader.initializeClass(AntClassLoader.ja
va:484)
at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:231)

at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:20smilie
at org.apache.tools.ant.Task.perform(Task.java:341)
at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:185)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
at com.werken.werkz.jelly.ProjectTag.doTag(ProjectTag.java:112)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.maven.plugin.PluginManager.runScript(PluginManager.java:11
43)
at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:
647)
at org.apache.maven.MavenSession.attainGoals(MavenSession.java:263)
at org.apache.maven.jelly.tags.maven.MavenTag.doTag(MavenTag.java:82)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoalTa
g.java:79)
at org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.perfor
mAction(MavenGoalTag.java:110)
at com.werken.werkz.Goal.fire(Goal.java:639)
at com.werken.werkz.Goal.attain(Goal.java:575)
at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:
671)
at org.apache.maven.MavenSession.attainGoals(MavenSession.java:263)
at org.apache.maven.cli.App.doMain(App.java:48smilie
at org.apache.maven.cli.App.main(App.java:1239)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.werken.forehead.Forehead.run(Forehead.java:551)
at com.werken.forehead.Forehead.main(Forehead.java:581)
Root cause
taskdef class org.apache.cactus.integration.ant.CactusTask cannot be found
at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:240)

at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:20smilie
at org.apache.tools.ant.Task.perform(Task.java:341)
at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:185)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
at com.werken.werkz.jelly.ProjectTag.doTag(ProjectTag.java:112)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.maven.plugin.PluginManager.runScript(PluginManager.java:11
43)
at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:
647)
at org.apache.maven.MavenSession.attainGoals(MavenSession.java:263)
at org.apache.maven.jelly.tags.maven.MavenTag.doTag(MavenTag.java:82)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoalTa
g.java:79)
at org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.perfor
mAction(MavenGoalTag.java:110)
at com.werken.werkz.Goal.fire(Goal.java:639)
at com.werken.werkz.Goal.attain(Goal.java:575)
at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:
671)
at org.apache.maven.MavenSession.attainGoals(MavenSession.java:263)
at org.apache.maven.cli.App.doMain(App.java:48smilie
at org.apache.maven.cli.App.main(App.java:1239)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.werken.forehead.Forehead.run(Forehead.java:551)
at com.werken.forehead.Forehead.main(Forehead.java:581)
Caused by: java.lang.NoClassDefFoundError: junit/framework/TestListener
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
at java.lang.Class.getDeclaredConstructors(Class.java:180smilie
at org.apache.tools.ant.AntClassLoader.initializeClass(AntClassLoader.ja
va:484)
at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:231)

... 28 more
--- Nested Exception ---
java.lang.NoClassDefFoundError: junit/framework/TestListener
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
at java.lang.Class.getDeclaredConstructors(Class.java:180smilie
at org.apache.tools.ant.AntClassLoader.initializeClass(AntClassLoader.ja
va:484)
at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:231)

at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:20smilie
at org.apache.tools.ant.Task.perform(Task.java:341)
at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:185)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:233)
at com.werken.werkz.jelly.ProjectTag.doTag(ProjectTag.java:112)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.maven.plugin.PluginManager.runScript(PluginManager.java:11
43)
at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:
647)
at org.apache.maven.MavenSession.attainGoals(MavenSession.java:263)
at org.apache.maven.jelly.tags.maven.MavenTag.doTag(MavenTag.java:82)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoalTa
g.java:79)
at org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.perfor
mAction(MavenGoalTag.java:110)
at com.werken.werkz.Goal.fire(Goal.java:639)
at com.werken.werkz.Goal.attain(Goal.java:575)
at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:
671)
at org.apache.maven.MavenSession.attainGoals(MavenSession.java:263)
at org.apache.maven.cli.App.doMain(App.java:48smilie
at org.apache.maven.cli.App.main(App.java:1239)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.werken.forehead.Forehead.run(Forehead.java:551)
at com.werken.forehead.Forehead.main(Forehead.java:581)
File...... C:supplier-portalmaven.xml
Element... maven:maven
Line...... 50
Column.... 31
C:supplier-portalsrc.. estmaven.xml:6:36: <taskdef> taskdef class org.apach
e.cactus.integration.ant.CactusTask cannot be found

Thanks,
Manasi