File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Testing and the fly likes getting java.lang.outOfMemory error while creating ear in jbossbuild.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Testing
Bookmark "getting java.lang.outOfMemory error while creating ear in jbossbuild.xml" Watch "getting java.lang.outOfMemory error while creating ear in jbossbuild.xml" New topic
Author

getting java.lang.outOfMemory error while creating ear in jbossbuild.xml

swarnaa lathap
Greenhorn

Joined: Mar 14, 2006
Posts: 4
Hii to All
i am trying to run cactus server using jbossbuild.xml.here i am getting java.lang.OutOfMemory error at ear.
[echo] war created successfully
cactifywar:
[cactifywar] Analyzing war: F:\workspace\CS_DEV\dist\war\cbs.war
[cactifywar] Building war: F:\workspace\CS_DEV\dist\war\cbs-cactus.war
[move] Moving 1 files to F:\workspace\CS_DEV\dist\war
package-ear:
[echo] Add a merge file named weblogic-application.xml to metadata/service if needed.
[copy] Copying 7 files to F:\workspace\CS_DEV\build\cbs-ear
[echo] No application deployment descriptor copied to ear for weblogic.
[ear] Building ear: F:\workspace\CS_DEV\dist\ear\cbs.ear
[echo] package-ear created successfully
cactifyear:
cactus:
BUILD FAILED: java.lang.OutOfMemoryError
Total time: 1 minute 19 seconds

junitbuild.xml like this:
<target name="cactifyear" depends="cactifywar,package-ear"
description="Cactifies WAR file by adding cactus-specific needs">
<!-- Replace tokens in test properties files -->
<copy todir="${test.dir}/web/classes">
<fileset dir="test/web" excludes="**/*.java" />
<filterset refid="variables.to.replace" />
</copy>

<!-- Cactify the EAR -->
<ear earfile="${ear.dist}/${app.context}.ear">
<zipfileset src="${ear.dist}/${app.context}.ear"/>
<fileset file="${webapp.dist}/${app.context}.war"/>
</ear>
</target>

Im not able to solve this problem from past twodays..please help me
swarna
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
What have you tried during those past two days? (It would help us help you if we'd know the dead-ends you've already stumbled upon)

Have you tried giving Ant's JVM a bigger heap?


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
swarnaa lathap
Greenhorn

Joined: Mar 14, 2006
Posts: 4
Hii
thanku very much for the response.here i am trying to run junittestcase for action class in struts frameswork.
i found that java.lang.outofmemory error i am getting after creation of war and ear.
the junitbuild.xml is like this

<target name="cactus" depends="cactifyear" description="Runs Cactus tests in Tomcat and Resin">
<cactus earfile="${ear.dist}/${app.context}.ear">
</cactus>
<echo> cactus run successfully </echo>
</target>

output like this:

[ear] Building ear: F:\workspace\CS_DEV\dist\ear\cbs.ear
[echo] package-ear created successfully
cactifyear:
[echo] created successfully cactifyear
[echo] created successfully ear
cactus:
BUILD FAILED: java.lang.OutOfMemoryError
Total time: 1 minute 26 seconds

What i observed,at the time of cactus running by using ear,JVM giving outofmemory error.here i am not getting
is wrong with testcase or the code i am approching to run cactus or what?
please clear me in this regard...
swarna
swarnaa lathap
Greenhorn

Joined: Mar 14, 2006
Posts: 4
hii
finally i resolved this problem..by incresing Virtual memory size and dont include unnecessary tasks in cactusbuild.xml..

swarna
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: getting java.lang.outOfMemory error while creating ear in jbossbuild.xml