jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicole Luneburg <Nicole.Luneb...@lisasoft.com>
Subject RE: How to set user principal in setUp()
Date Thu, 15 Jan 2009 05:28:39 GMT
Back again.

In my app (so not the sample one anymore) when I run the test target I get an error:

OutOfMemoryError: Java heap space

I googled around and it seems this was occurring previously with the cactify task, patches
were made and it's now fixed in cactus 1.8.
This error however occurs after the cactifyear task, like:

-- start

cactifyear:
[cactuswar] Analyzing war: C:\Sandbox\MyApp\build\myapp.war
[cactuswar] Building war: C:\Sandbox\MyApp\cactus1867079242cactus.war
[cactifyear] Building ear: C:\Sandbox\MyApp\myapp-cactified.ear

test:
     [echo] Please take a deep breath while Cargo gets JBoss for running MyApp tests...

BUILD FAILED
java.lang.OutOfMemoryError: Java heap space
        at java.util.Arrays.copyOf(Arrays.java:2786)
        at java.io.ByteArrayOutputStream.toByteArray(ByteArrayOutputStream.java:133)
        at org.codehaus.cargo.module.DefaultJarArchive.streamToByteArray(DefaultJarArchive.java:295)
        at org.codehaus.cargo.module.DefaultJarArchive.<init>(DefaultJarArchive.java:86)
        at org.codehaus.cargo.module.application.DefaultEarArchive.<init>(DefaultEarArchive.java:66)
        at org.apache.cactus.integration.ant.deployment.EarParser.parse(EarParser.java:60)
        at org.apache.cactus.integration.ant.CactusTask.execute(CactusTask.java:144)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
        at org.apache.tools.ant.Main.runBuild(Main.java:758)
        at org.apache.tools.ant.Main.startAnt(Main.java:217)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

Total time: 1 minute 23 seconds
C:\Sandbox\MyApp>

-- end

I'm not sure where I can increase the heap space.
My test target is pretty much like in the ejb3 example:

        <target name="test" depends="cactifyear">
          <echo>Please take a deep breath while Cargo gets JBoss for running MyApp tests...</echo>

                <cactus earfile="${cactified.ejb3.archive.name}" printsummary="yes">
                        <classpath>
                                <path refid="cactus.classpath"/>
                                <pathelement location="${build.dir}"/>
                        </classpath>
                        <containerset>
                                <cargo containerId="${jboss.container.id}" output="${logs.dir}/output.log"
log="${logs.dir}/cargo.log" home="C:\programs\jboss-4.2.3.GA">
                                        <configuration>
                                                <property name="cargo.servlet.port" value="${cargo.servlet.port}"/>
                                                <property name="cargo.logging" value="${cargo.logging}"/>
                                                <deployable type="${cactus.archive.type}"
file="${cactified.ejb3.archive.name}"/>
                                        </configuration>
                                </cargo>
                        </containerset>

                        <formatter type="${cactus.formatter.type}"/>
                        <batchtest todir="${reports.dir}">
                                <fileset dir="${src.test.dir}">
                                        <include name="**/Test*.java"/>
                                </fileset>
                        </batchtest>
                </cactus>
        </target>

Anyone any ideas?

Cheers,
Nic

The contents of this email are confidential and may be subject to legal or professional privilege
and copyright. No representation is made that this email is free of viruses or other defects.
If you have received this communication in error, you may not copy or distribute any part
of it or otherwise disclose its contents to anyone. Please advise the sender of your incorrect
receipt of this correspondence.

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


Mime
View raw message