Jenkins で build.xml を使用して Junit テスト ケースを実行しています。特定のテスト ケースを実行すると、以下のエラーが発生します。
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 500 Java heap space</title>
</head>
<body><h2>HTTP ERROR 500</h2>
<p>Problem accessing /url. Reason:
<pre> Java heap space</pre></p><h3>Caused by:</h3><pre>java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2882)
at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
at java.lang.StringBuilder.append(StringBuilder.java:119)
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Long.parseLong(Long.java:410)
at java.lang.Long.valueOf(Long.java:525)
at org.codehaus.jettison.mapped.DefaultConverter.convertToJSONPrimitive(DefaultConverter.java:39)
at org.codehaus.jettison.mapped.MappedNamespaceConvention.convertToJSONPrimitive(MappedNamespaceConvention.java:282)
at org.codehaus.jettison.mapped.MappedXMLStreamWriter$JSONPropertyObject.withProperty(MappedXMLStreamWriter.java:153)
at org.codehaus.jettison.mapped.MappedXMLStreamWriter$JSONProperty.withProperty(MappedXMLStreamWriter.java:66)
at org.codehaus.jettison.mapped.MappedXMLStreamWriter.writeEndElement(MappedXMLStreamWriter.java:247)
at com.sun.xml.bind.v2.runtime.output.XMLStreamWriterOutput.endTag(XMLStreamWriterOutput.java:144)
at com.sun.xml.bind.v2.runtime.output.XmlOutputAbstractImpl.endTag(XmlOutputAbstractImpl.java:120)
at com.sun.xml.bind.v2.runtime.XMLSerializer.leafElement(XMLSerializer.java:326)
at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$StringImplImpl.writeLeafElement(RuntimeBuiltinLeafInfoImpl.java:1041)
at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$StringImplImpl.writeLeafElement(RuntimeBuiltinLeafInfoImpl.java:1020)
at com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor$CompositeTransducedAccessorImpl.writeLeafElement(TransducedAccessor.java:252)
at com.sun.xml.bind.v2.runtime.property.SingleElementLeafProperty.serializeBody(SingleElementLeafProperty.java:121)
at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:340)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:696)
at com.sun.xml.bind.v2.runtime.property.SingleElementNodeProperty.serializeBody(SingleElementNodeProperty.java:152)
at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:340)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:696)
at com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.serializeItem(ArrayElementNodeProperty.java:65)
at com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(ArrayElementProperty.java:168)
at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERProperty.java:155)
at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:340)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsSoleContent(XMLSerializer.java:593)
at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeRoot(ClassBeanInfoImpl.java:324)
at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:494)
at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:315)
以下は、junit テストケース build.xml を実行するために使用する build.xml コードです。
<target name="runTests">
<junit fork="yes" forkmode="once" printsummary="yes" dir="${basedir}" includeantruntime="yes" failureproperty="failureTest" maxmemory="1024m" jvm="">
<jvmarg value="-XX:MaxPermSize=512M"/>
<jvmarg value="-Dlog4j.configuration=log4j.properties"/>
ただし、このエラーは特定のシステムでのみ発生しており、すべての環境で発生しているわけではありません。どうすればこれを取り除くことができますか?