Sciology = Science + Technology

Religious Programming (Eclipse; AJAX; SOA; Mashups; XP + SCRUM).

Archive for the 'Exceptions' Category


org.eclipse.swt.SWTException: Unable to load graphics library [GDI+ is required] (java.lang.NoClassDefFoundError)

Posted by sureshkrishna on August 25, 2007

This is the SWTException that you might see on the W2K machine. This cause for this exception is absence of GDI+ library (gdiplus.dll) on Windows 2000. On WindowsXP and Vista they come by default and its taken care of.

Don’t be dis-hearted by this, you can download from Microsoft site and every thing should work fine. For those who want to have some additional information…

http://www.eclipse.org/swt/faq.php#nographicslibrary
http://www-1.ibm.com/support/docview.wss?rs=2357&context=SS6RTP&dc=DB520&uid=swg21260149&loc=en_US&cs=UTF-8〈=en&rss=ct2357lotus
http://forum.springframework.org/showthread.php?t=36127
http://dev.eclipse.org/newslists/news.eclipse.technology.gmf/msg03973.html

Posted in Eclipse, Exceptions, PShelf, Plug-ins, Plugin, RCP, SWT, Uncategorized | 1 Comment »

java.lang.OutOfMemoryError: PermGen space

Posted by sureshkrishna on July 19, 2007

Looks like this is been a common error for almost memory intensive applications now-a-days. I have been working on eclipse for a long time and recently with the Eclipse + Java 1.5.0_04 + EMF + WTP combimation of installation, i have been seeing the error more often.

Its been quite emberrasing to see such errors on the client machines and especially when i was not sure of the problem and the root of the cause. In anycase after going through couple of documents on the java and eclipse news groups, looks like this problem can be avoided if we set some jvm arguments. Some also suggest that if we use IBM’s Java, it would be solved. But i have not changed the Java from Sun to IBM but just the vm arguments works.

It can be done in few different ways…

  • Set the arguments in the Run or Profile windows of eclipse -XX:PermSize=128M -XX:MaxPermSize=256M
  • Set the arguments in eclipse.ini file in eclipse home directory
  • Set these programmatically…

In my case i have the following vm agrs already set  :)

-Xms256m
-Xmx1024m
-XX:PermSize=128M
-XX:MaxPermSize=256M

 Few other sources to get more info…

http://www.brokenbuild.com/blog/2006/08/04/java-jvm-gc-permgen-and-memory-options/

http://java.sun.com/docs/hotspot/gc1.4.2/faq.html

Posted in Exceptions, Java, OutOfMemoryError | No Comments »