0

To preface the problem, I have read the responses regarding "OutOfMemoryError: GC overhead limit exceeded" and other useful responses, so the focus of the question is not on the OutOfMemory error, but why ant failonerror="true" appears to not be trapping the failure?

<java fork="true" dir="${deployDir}/jspc" classname="weblogic.appc" classpathref="appc.classpath" failonerror="true" >
   <jvmarg line="-Xms1024M -Xmx1636M"/>
   <arg line="-forceGeneration -verbose -deprecation ${sourceDir}/html"/>
</java>

The logs show:

[java] Exception encountered while compiling /source/html/future_requests/confirmation.jsp
[java] java.lang.OutOfMemoryError: GC overhead limit exceeded
[java]     at com.bea.core.repackaged.jdt.internal.compiler.flow.FlowContext.checkExceptionHandlers(FlowContext.java:206)
...
[java] Exception encountered while compiling /source/html/future_requests/confirmation.jsp
[java] java.lang.OutOfMemoryError: GC overhead limit exceeded
[java] Exception encountered while compiling /source/html/future_requests/confirmation.jsp
[java] java.lang.OutOfMemoryError: GC overhead limit exceeded
[java] <May 16, 2013 4:48:54 AM UTC> <Info> <J2EE> <BEA-160220> <Compilation completed successfully>

And ant appears to happily carry on executing the build instructions. Any suggestions to why ant is not failing the building? How to cause ant to bail?

Thanks

Community
  • 1
  • 1
Ian W
  • 4,559
  • 2
  • 18
  • 37
  • Ant will process the return code of `appc`, which presumably is still zero, even if it suffers the error you see here. You might be reduced to capturing the output and scanning it for errors to decide whether to fail the build. – martin clayton May 16 '13 at 08:29
  • I suppose then the re-formulated question would be, is there any option to force appc to throw an error? [Oracle Weblogic appc](http://docs.oracle.com/cd/E11035_01/wls100/ejb/appc_ejbc.html) I can't see it. – Ian W May 17 '13 at 11:20

0 Answers0