Hi Brian,

there is a rather serious problem with the implementation of the CactifyWar task: it will read the content of the entire WAR into memory to be able to analyze whether it needs to add the cactus JARs. Thus if your WAR is very large, it could be possible for the task to run out of memory. I wanted to have this issue addressed quite some time ago, but haven't had the time (and maybe not the skill ;-P ) so far.

'tis pretty weird that the exception is thrown from Project.executeTarget though. Maybe the nested exception gives the exact location where we're running out of memory? (I suspect it to be the WarArchive class).

-chris

brian janaszek wrote:
Hi--

I've been developing a testing framework for our web application (the
app uses Turbine 2.2/Torque 3.1 as a its framework), and I've finally
settled on Cactus for a testing framework.  Here's a brief overview of
the system...

Linux (RedHat 8)
Turbine 2.2 (Tomcat 4.x)
Ant 1.6 (built from source)

Until this morning, I was able to successfully run basic Cactus tests on
my machine.  Then, after modifying a test class, I ran my compile target
(which also generates a WAR file) and my unit-tests target (which uses
the Ant <cactus> and <cactifywar> tasks), and once the classes were
compiled and the WAR generated, the <cactifywar> task generated an
OutOfMemory error.  The stack trace follows:

<snip>
unit-tests:
[cactifywar] Analyzing war:
/usr/local/tdk-2.2/webapps/janus/WEB-INF/build/janus.war
BUILD FAILED
java.lang.OutOfMemoryError
at org.apache.tools.ant.Project.executeTarget(Project.java:1246)
at
org.apache.tools.ant.Project.executeTargets(Project.java:1094)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:220)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:213)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:90)
Caused by: java.lang.OutOfMemoryError
--- Nested Exception ---
java.lang.OutOfMemoryError
</snip>


I can still run any of my non-Cactus/non-testing target, including
compile, which does not set a max/min memory for the JVM that <javac>
uses.  But if I attempt to run any of the Cactus-related tasks, I get an
OutOfMemory error.  I'm assuming that I'll have to possibly fork the the
testing processes, but I'm still not sure why the error starting popping
up after two days of successful test runs.

TIA
b




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to