Showing posts with label Eclipse. Show all posts
Showing posts with label Eclipse. Show all posts

Wednesday, July 21, 2010

Eclipse getting Out of Memory

I installed latest version of JDK 1.6.21 and latest eclipse Halilos version to Windows 7 (32bit). Eclipse started crashing again and again after few minutes, giving me the out of Memory issue in logs.




Here is the exception log:


!ENTRY org.eclipse.ui 4 0 2010-07-21 09:08:30.662
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.OutOfMemoryError: PermGen space
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:165)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:554)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:524)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:455)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:443)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:423)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:193)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:370)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:446)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:399)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:387)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at org.eclipse.wst.sse.ui.StructuredTextEditor.createActions(StructuredTextEditor.java:1277)
at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl(AbstractTextEditor.java:3362)
at org.eclipse.ui.texteditor.StatusTextEditor.createPartControl(StatusTextEditor.java:53)
at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.createPartControl(AbstractDecoratedTextEditor.java:394)
at org.eclipse.wst.sse.ui.StructuredTextEditor.createPartControl(StructuredTextEditor.java:1362)
at org.eclipse.ui.part.MultiPageEditorPart.addPage(MultiPageEditorPart.java:217)
at org.eclipse.ui.part.MultiPageEditorPart.addPage(MultiPageEditorPart.java:187)
at org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart.addSourcePage(XMLMultiPageEditorPart.java:435)
at org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart.createPages(XMLMultiPageEditorPart.java:605)
at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:310)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:661)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:428)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:594)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:306)
at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)

Solution:

After struggling with this, I found this issue is due to the latest JDK v1.6.21. Best is to use the stable version of JDK that is: JDK v 1.6.20 and configure it accordingly.
Hopefully it will resolve the issue, if still getting the issue add following line after "-vmargs" to your eclipse.ini file:
-XX:MaxPermSize=256m
The eclipse.ini file can be found under eclipse directory. It will be someting like this:

eclipse.ini
---------------
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
512M

-framework

plugins\org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar

-vm

C:\Program Files\Java\jdk1.5.0_22\bin

-vmargs

-XX:MaxPermSize=512m

-Dosgi.requiredJavaVersion=1.5

-Xms128m

-Xmx1024m

---------------

Thursday, July 8, 2010

Installation of Subclipse and Connecting to Repository

Installation of Subclipse:

This blog will describe the installation of Subclipse directly through Eclipse. Please note, for safety purposes, a separate instance of eclipse should be installed prior to installation of the repository.

Information on Subclipse can be found here:
http://subclipse.tigris.org/

And new versions of Eclipse can be founder here:
http://www.eclipse.org

At the writing of this document, I am using Galileo release of Eclipse (Version 3.5.2).

Step 1
Goto Help menu, and select Install New Software...



Step 2
Add the site where Subclipse can be downloaded from.



Step 3
Select the checkbox that is next to the Subclipse name. This will install all items required for Subclipse, and an additional merge utility.



Step 4
Review the install details, and click next. Then accept the license agreement presented after reviewing the install details.





Step 5
Once completed, and you hit next, the download of the plugin will occur.



Conclusion: Restart Eclipse...



Connecting to Repository:

Next step is to download the repository of your projects source. Unlike CVS, SVN represents branches and tags as files in the folder structure. We want to be careful not to check out the entire repository. If the entire repository is checked out, a representation of every tag and branch ever made for the application will be downloaded as a local copy to the hard drive. This could consume a lot of disk space very carefully.

Create a new project in Eclipse from the SVN repository. Select "Checkout Projects from SVN." Then click next.



If you do not have any repository yet, select "Create a new repository location" then click next.



And provide the SVN repository path and click Next and then Finish.



Select the appropriate project listed (Not Shown here) and click Next.
Create a new project to add to your workspace. Ensure "Check out HEAD revision_"_ and check out as a new project in your workspace, or use the New Project Wizard (not shown) to create a new project.




Use the default workspace, or one you already have defined.




The SVN Repository checkout will start right away.




Sysdeo Eclipse Tomcat Launcher plugin

Plugin features

  • Starting and stopping Tomcat 4.x, 5.x and 6.x

  • Registering Tomcat process to Eclipse debugger

  • Creating a WAR project (wizard can update server.xml file)

  • Adding Java Projects to Tomcat classpath

  • Setting Tomcat JVM parameters, classpath and bootclasspath

  • Exporting a Tomcat project to a WAR File

  • Capability to use a custom Tomcat classloader to load classes in several java projects at the same classloader level than classes in a Tomcat project, see readmeDevLoader.html (Thanks Martin Kahr)

    Download Link: