We are using Eclipselink and need to weave the code in order for lazy fetching to work property.
During the weave process I'm getting the following error:
weave:
BUILD FAILED
java.lang.OutOfMemoryError: PermGen space
I have the following tasks within my ant build file:
<target name="define_weave_task" description="task definition for EclipseLink static weaving">
<taskdef name="eclipse_weave" classname="org.eclipse.persistence.tools.weaving.jpa.StaticWeaveAntTask"/>
</target>
<target name="weave" depends="compile,define_weave_task" description="weave eclipselink code into compiled classes">
<eclipse_weave source="${path.classes}" target="${path.classes}">
<classpath refid="compile.classpath"/>
</eclipse_weave>
</target>
It has been working great for a long time. Now that the amount of code to be woven has increased I'm getting the PermGen error. I would like to be able to up the amount of perm space.
If I was doing a compile I would be able to up the perm space via a compiler argument such as <compilerarg value="-XX:MaxPermSize=256M"/>
but this does not appear to be a valid argument for eclipselink weaving.
How can I up the perm space for the weave?