开发者

OutOfMemoryError trying to run Cactus unit tests

We have a Hudson/Ant build setup. I have just add开发者_高级运维ed a series of Apache Cactus (version 1.8.1) unit tests to the project and am trying to run them after the project builds. I get the following error when it tries to execute the cactus task: "java.lang.OutOfMemoryError: Java heap space."

We have already bumped up the Java heap space as much as we can. Is there a way to make the Cactus task use less memory? Or something else I can do within the test cases themselves to reduce the memory footprint?


Are you absolutely certain the tests do not reveal a memory leak?


When you say you already bumped up the heap 'as much as you can', can you be more specific? 1g? 2g? Also, why don't you run the Java process with:

-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="my_dump.out"

and view the heap dump in a tool like HPjmeter to see what is being held onto in memory? Otherwise, your sort of operating in the dark. Can you also menion whether you're running with a 32-bit or 64-bit JVM?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜