Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » New out of memory errors during PDE build?
New out of memory errors during PDE build? [message #716925] Thu, 18 August 2011 19:41 Go to next message
Nadeem Aboobaker is currently offline Nadeem AboobakerFriend
Messages: 20
Registered: July 2009
Junior Member
We recently switched from Eclipse 3.6.2 to Eclipse 3.7 and as a result had to change the way we referenced library jar files in our plugins.


We used to do this in the plugin.xml:

<runtime>
<library name="../../somefolder/somejar.jar"><export name="*"/></library>
...
<library name="../anotherfolder/anotherjar.jar"><export name="*"/></library>
</runtime>


It turns out that the "feature" of being able to refer to jar files outside of a plugin was fixed in Bug 342114. So, we changed the way our library jar files get referenced.


Now we use MANIFEST.MF and explicitly list every package in the jar files:

Bundle-Classpath: external:c:/somefolder/somejar.jar,
external:c:/folder/anotherfolder/anotherjar.jar
Export-Package: com.example.some.package,
com.example.another.package,
...
com.example.package



Now when we run the command line PDE build or the build in our development Eclipse, we get "OutOfMemoryError: Java heap space" errors even after significantly increasing our VM memory. We've gone from everything working fine at -Xmx512m to now running out of memory at -Xmx1024m. If increased much past that, then the Eclipse/VM doesn't launch on our 32 bit Windows due to the memory number being too high.

Just a few notes:
- It's not a matter of a few jars and a few exported packages, it's 500+ jar files and 10,000 packages. I understand that's a very high number, but it worked when using plugin.xml and *.
- The PDE still builds correctly when using the plugin.xml way of referring to the external jars, but the runtime does not work (leads to class not found problems).
- There are no problems at runtime with using the MANIFEST.MF approach. Eclipse uses the same memory VM settings as before and things work just as before.

So, my question is, is this a PDE bug that using MANIFEST.MF and listing every package name doesn't work, but doing the same thing with plugin.xml and * works perfectly fine?

[Updated on: Thu, 18 August 2011 19:55]

Report message to a moderator

Re: New out of memory errors during PDE build? [message #716926 is a reply to message #716925] Thu, 18 August 2011 19:42 Go to previous messageGo to next message
Nadeem Aboobaker is currently offline Nadeem AboobakerFriend
Messages: 20
Registered: July 2009
Junior Member
FYI, here's the exception/stacktrace when doing the build within Eclipse/PDE:

!ENTRY org.eclipse.core.jobs 4 2 2011-08-18 11:26:18.661
!MESSAGE An internal error occurred during: "Initializing Java Tooling".
!STACK 0
java.lang.OutOfMemoryError: Java heap space
at org.eclipse.jdt.internal.core.ClasspathEntry.<init>(ClasspathEntry.java:285)
at org.eclipse.jdt.internal.core.ClasspathEntry.<init>(ClasspathEntry.java:255)
at org.eclipse.jdt.core.JavaCore.newLibraryEntry(JavaCore.java:4188)
at org.eclipse.pde.internal.core.PDEClasspathContainer.addLibraryEntry(PDEClasspathContainer.java:100)
at org.eclipse.pde.internal.core.PDEClasspathContainer.addExternalPlugin(PDEClasspathContainer.java:92)
at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.addPlugin(RequiredPluginsClasspathContainer.java:256)
at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.addDependency(RequiredPluginsClasspathContainer.java:230)
at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.addDependency(RequiredPluginsClasspathContainer.java:242)
at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.addDependency(RequiredPluginsClasspathContainer.java:214)
at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.computePluginEntries(RequiredPluginsClasspathContainer.java:129)
at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.getClasspathEntries(RequiredPluginsClasspathContainer.java:88)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2680)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2838)
at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:1943)
at org.eclipse.jdt.core.JavaCore.initializeAfterLoad(JavaCore.java:3576)
at org.eclipse.jdt.internal.ui.InitializeAfterLoadJob$RealJob.run(InitializeAfterLoadJob.java:36)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54
)

[Updated on: Thu, 18 August 2011 19:55]

Report message to a moderator

Re: New out of memory errors during PDE build? [message #716927 is a reply to message #716926] Thu, 18 August 2011 19:43 Go to previous messageGo to next message
Nadeem Aboobaker is currently offline Nadeem AboobakerFriend
Messages: 20
Registered: July 2009
Junior Member
And here's the exception/stacktrace when doing the build on the command line with the PDE antRunner build:

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.StringBuffer.append(StringBuffer.java:224)
at org.eclipse.pde.internal.build.builder.ClasspathComputer3_0.addPathAndCheck(ClasspathComputer3_0.java:358)
at org.eclipse.pde.internal.build.builder.ClasspathComputer3_0.addRuntimeLibraries(ClasspathComputer3_0.java:251)
at org.eclipse.pde.internal.build.builder.ClasspathComputer3_0.addPlugin(ClasspathComputer3_0.java:231)
at org.eclipse.pde.internal.build.builder.ClasspathComputer3_0.addPluginAndPrerequisites(ClasspathComputer3_0.java:610)
at org.eclipse.pde.internal.build.builder.ClasspathComputer3_0.addPrerequisites(ClasspathComputer3_0.java:569)
at org.eclipse.pde.internal.build.builder.ClasspathComputer3_0.getClasspath(ClasspathComputer3_0.java:155)
at org.eclipse.pde.internal.build.builder.ModelBuildScriptGenerator.generateBuildJarsTarget(ModelBuildScriptGenerator.java:1261)
at org.eclipse.pde.internal.build.builder.ModelBuildScriptGenerator.generateBuildScript(ModelBuildScriptGenerator.java:307)
at org.eclipse.pde.internal.build.builder.ModelBuildScriptGenerator.generate(ModelBuildScriptGenerator.java:161)
at org.eclipse.pde.internal.build.builder.BuildDirector.generateModels(BuildDirector.java:546)
at org.eclipse.pde.internal.build.builder.BuildDirector.generateChildrenScripts(BuildDirector.java:291)
at org.eclipse.pde.internal.build.builder.BuildDirector.generate(BuildDirector.java:225)
at org.eclipse.pde.internal.build.builder.BuildDirector.generate(BuildDirector.java:218)
at org.eclipse.pde.internal.build.BuildScriptGenerator.generateFeatures(BuildScriptGenerator.java:253)
at org.eclipse.pde.internal.build.BuildScriptGenerator.generate(BuildScriptGenerator.java:127)
at org.eclipse.pde.internal.build.tasks.BuildScriptGeneratorTask.run(BuildScriptGeneratorTask.java:106)
at org.eclipse.pde.internal.build.tasks.BuildScriptGeneratorTask.execute(BuildScriptGeneratorTask.java:92)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.eclipse.ant.internal.core.ant.EclipseSingleCheckExecutor.executeTargets(EclipseSingleCheckExecutor.java:30)

[Updated on: Thu, 18 August 2011 19:56]

Report message to a moderator

(no subject) [message #717034 is a reply to message #716927] Fri, 19 August 2011 06:29 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
On 18.08.2011 21:43, Nadeem Aboobaker wrote:
> And here's the exception/stacktrace when doing the build on the
> command line with the PDE antRunner build:
Please file a bug report.

Dani
>
> 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.StringBuffer.append(StringBuffer.java:224)
> at
> org.eclipse.pde.internal.build.builder.ClasspathComputer3_0.addPathAndCheck(ClasspathComputer3_0.java:358)
> at
> org.eclipse.pde.internal.build.builder.ClasspathComputer3_0.addRuntimeLibraries(ClasspathComputer3_0.java:251)
> at
> org.eclipse.pde.internal.build.builder.ClasspathComputer3_0.addPlugin(ClasspathComputer3_0.java:231)
> at
> org.eclipse.pde.internal.build.builder.ClasspathComputer3_0.addPluginAndPrerequisites(ClasspathComputer3_0.java:610)
> at
> org.eclipse.pde.internal.build.builder.ClasspathComputer3_0.addPrerequisites(ClasspathComputer3_0.java:569)
> at
> org.eclipse.pde.internal.build.builder.ClasspathComputer3_0.getClasspath(ClasspathComputer3_0.java:155)
> at
> org.eclipse.pde.internal.build.builder.ModelBuildScriptGenerator.generateBuildJarsTarget(ModelBuildScriptGenerator.java:1261)
> at
> org.eclipse.pde.internal.build.builder.ModelBuildScriptGenerator.generateBuildScript(ModelBuildScriptGenerator.java:307)
> at
> org.eclipse.pde.internal.build.builder.ModelBuildScriptGenerator.generate(ModelBuildScriptGenerator.java:161)
> at
> org.eclipse.pde.internal.build.builder.BuildDirector.generateModels(BuildDirector.java:546)
> at
> org.eclipse.pde.internal.build.builder.BuildDirector.generateChildrenScripts(BuildDirector.java:291)
> at
> org.eclipse.pde.internal.build.builder.BuildDirector.generate(BuildDirector.java:225)
> at
> org.eclipse.pde.internal.build.builder.BuildDirector.generate(BuildDirector.java:218)
> at
> org.eclipse.pde.internal.build.BuildScriptGenerator.generateFeatures(BuildScriptGenerator.java:253)
> at
> org.eclipse.pde.internal.build.BuildScriptGenerator.generate(BuildScriptGenerator.java:127)
> at
> org.eclipse.pde.internal.build.tasks.BuildScriptGeneratorTask.run(BuildScriptGeneratorTask.java:106)
> at
> org.eclipse.pde.internal.build.tasks.BuildScriptGeneratorTask.execute(BuildScriptGeneratorTask.java:92)
> at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
> at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
> at org.apache.tools.ant.Task.perform(Task.java:348)
> at org.apache.tools.ant.Target.execute(Target.java:390)
> at org.apache.tools.ant.Target.performTasks(Target.java:411)
> at
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
> at
> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
> at
> org.eclipse.ant.internal.core.ant.EclipseSingleCheckExecutor.executeTargets(EclipseSingleCheckExecutor.java:30)
>
Re: (no subject) [message #717897 is a reply to message #717034] Mon, 22 August 2011 16:52 Go to previous message
Nadeem Aboobaker is currently offline Nadeem AboobakerFriend
Messages: 20
Registered: July 2009
Junior Member
Bug 355256 filed.

Dani Megert wrote on Fri, 19 August 2011 02:29

Please file a bug report.

Dani

Previous Topic:commonFilter doesn't work for me
Next Topic:GoTo / Go To Marker in Problem View
Goto Forum:
  


Current Time: Thu Oct 22 08:08:04 GMT 2020

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

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

Back to the top