throws out of memory error

atish <[email protected]>
Newsgroups gmane.comp.jakarta.cactus.user
Message-ID <[email protected]>
Hi All,

While working on cactus Ant, Ant throws out of memory error (during 
cactifywar). 

I am having 2GB RAM. I am using apache-ant-1.6.3 and cactus1.7.1. 

I had set "ANT_OPT" attribute to %ANT_OPT% "-Xmx512m" in build.properties.
As well you can see in below snipet, I had set "maxmemory" attribute to
"512M" in cactus tag. Still, I am getting OUT OF MEMORY.

below is the snipet of cactus in build.xml

	<target name="init-cactus" depends="pre-init" >
		<path id="cactus.classpath1">
			<pathelement location="${lib.src.dir}/cactus-ant-1.7dev20040523.jar"/>
			<pathelement location="${lib.src.dir}/cactus-1.7.1.jar" />
			<pathelement location="${lib.src.dir}/commons-httpclient-2.0.2.jar"/>
			<pathelement location="${lib.src.dir}/commons-logging-1.1.jar"/>
			<pathelement location="${lib.src.dir}/aspectjrt.jar"/>
			<pathelement location="${lib.src.dir}/junit-3.8.1.jar"/>
            <pathelement location="${lib.src.dir}/httpunit-1.6.jar" />
		</path>
    </target>

	<target name="cactify-war" depends="init-cactus" >
		<taskdef resource="cactus.tasks" classpathref="cactus.classpath" />
		<cactifywar srcfile="${lib.output.dir}/myweb.war"
destfile="${lib.output.dir}/cactified.war">
			<classes dir="${src.dir}" includes="**/cactustest/*.class"/>
			<lib file="${lib.src.dir}/httpunit-1.6.jar"/>
		</cactifywar>
	</target>

	<target name="cactus-test" depends="cactify-war">
		<taskdef resource="cactus.tasks" classpathref="cactus.classpath" />

		<cactus warfile="${lib.output.dir}/cactified.war" maxmemory="512M">
			<classpath>
				<path refid="build.classpath"/>
				<pathelement location="${classes.output.dir}"/>
			</classpath>
			<containerset>
				<generic startuptarget = "start-wls" shutdowntarget = "stop-wls"/>
			</containerset>
			<formatter type="xml"/>
			<batchtest>
				<fileset dir="${classes.output.dir}">
				</fileset>
			</batchtest>
		</cactus>
    </target>


error on command prompt:

pre-init:
 [property] Loading Environment env.
[available] Found: build.properties
 [property] Loading X:\build.properties
     [echo] weblogic91.present = true

init-cactus:

cactify-war:
[cactifywar] Analyzing war: X:\build_output.WebLogic\lib\myweb.war

BUILD FAILED
java.lang.OutOfMemoryError: Java heap space
        at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1225)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
        at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java
:40)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
        at org.apache.tools.ant.Main.runBuild(Main.java:668)
        at org.apache.tools.ant.Main.startAnt(Main.java:187)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Caused by: java.lang.OutOfMemoryError: Java heap space
--- Nested Exception ---
java.lang.OutOfMemoryError: Java heap space


So please help me out as soon as possible, if anybody have some idea about
this problem.

thanks in advance.
-- 
View this message in context: http://www.nabble.com/throws-out-of-memory-error-tf3583346.html#a10012927
Sent from the Cactus - User mailing list archive at Nabble.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.