Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Build via Eclipse Ant task fails with OutOfMemoryError - after about 50 builds
Build via Eclipse Ant task fails with OutOfMemoryError - after about 50 builds [message #1751755] Fri, 13 January 2017 14:09 Go to next message
Vikram Sjn is currently offline Vikram SjnFriend
Messages: 39
Registered: July 2009
Member
Created headless build setup of projects in Eclipse workspace.

Basically this is how its working
* Eclipse workspace has the projects
* Via ant file
- Clean, refresh, build the eclipse workspace - using eclipse ant task
- then run tasks to build jar

All working fine - except that the build via eclipse ant task - runs into OutOfMemoryError after about 50 such executions.

NOTE: Automated build keeps failing - until open Eclipse on that workspace and close.
Thereafter again runs fine for 50 builds, and then OutOfMemoryError


Build workspace task in the Ant file
<target name="build_workspace">
   <echo message="building workspace" />
    <eclipse.incrementalBuild kind="full"/>
</target>


Also tried kind = clean and incremental separately but same error.

<target name="build_workspace">
   <echo message="building workspace" />
    <eclipse.incrementalBuild kind="clean"/>
    <eclipse.incrementalBuild kind="incremental"/>
</target>


Looks like something piling up in the workspace, that gets cleaned/corrected when open Eclipse on that workspace.

Kindly suggest some solution/pointers.

Here is how the build failure looks like

build_workspace:
    [echo] building workspace

BUILD FAILED
C:\Users\US\.jenkins\workspace\XBReleaseBranchTests\testrunscripts\runtests.xml:51: 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.Throwable.toString(Throwable.java:344)
    at java.lang.String.valueOf(String.java:2826)
    at java.io.PrintWriter.println(PrintWriter.java:710)
    at java.lang.Throwable.printStackTrace(Throwable.java:509)
    at org.eclipse.jdt.internal.compiler.util.Util.getExceptionSummary(Util.java:627)
    at org.eclipse.jdt.internal.compiler.Compiler.handleInternalException(Compiler.java:589)
    at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:524)
    at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:365)
    at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:178)
    at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:302)
    at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:60)
    at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:254)
    at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:173)
    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
    at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
    at org.eclipse.core.internal.resources.Workspace.buildInternal(Workspace.java:513)
    at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:422)
    at org.eclipse.core.resources.ant.IncrementalBuild.execute(IncrementalBuild.java:75)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

[Updated on: Mon, 06 March 2017 06:04]

Report message to a moderator

Re: Build via Eclipse Ant task fails with OutOfMemoryError - after about 50 builds [message #1755438 is a reply to message #1751755] Fri, 03 March 2017 11:09 Go to previous message
Vikram Sjn is currently offline Vikram SjnFriend
Messages: 39
Registered: July 2009
Member
1.
I was using Eclipse Juno SR1
Suspecting issue with Eclipse - switched to Eclipse Kepler SR2
But the problem is still same.

The automated build setup of projects (in Jenkins), fails exactly at 86th build --- as it failed with Eclipse Juno SR1

2.
This is the command line

"C:\Program Files (x86)\Java\jdk1.6.0_45\jre\bin\java.exe" -cp "C:\eclipse-jee-kepler-SR2-win32\eclipse\plugins\org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar" org.eclipse.equinox.launcher.Main -noupdate -application org.eclipse.ant.core.antRunner -data "C:\Users\US\.jenkins\workspace\OOMEJobTest\ecworkspace" -buildfile "C:\Users\US\.jenkins\workspace\OOMEJobTest\testrunscripts\runtests.xml" -vmargs -Xms128M -Xmx1024M -XX:PermSize=128M -XX:MaxPermSize=256M


Please suggest, what should I try / change.

[Updated on: Mon, 06 March 2017 06:04]

Report message to a moderator

Previous Topic:Compare Editor - Setting the position of multiple Compare Editors in a Workbench
Next Topic:e4view Menu Contribution
Goto Forum:
  


Current Time: Tue Sep 25 04:47:45 GMT 2018

Powered by FUDForum. Page generated in 0.02978 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top