Search

Monday, February 7, 2011

Common problems and updates on Eclipse

Common problems (and solutions if solved) and updates related to Eclipse installation and usage based on personal experience.

Environment : Linux Fedora 14. Java version "1.6.0_20".
OpenJDK Runtime Environment (IcedTea6 1.9.5)  (fedora-51.1.9.5.fc14-i386). OpenJDK Client VM (build 19.0-b09, mixed mode).
If not mentioned Eclipse Helios 3.6.1 instance is used, downloaded and installed from Fedora's default package (Add/Remove Software).


Install Springsource Tool Suite plugin
click here for post about STS plugin installation ..

Problem when installing Google Application Engine plugin
Problem : some dependencies not satisfied for GAE plugin installation

Can't create Java class, window and Finish button did not respond
Create New Class window for Java Web Project in Eclipse

Steps producing problem : 
  1. Run Eclipse instance
  2. File > New > (Java) Class
  3. Fill all necessary input (package name, class name)
Problem : Finish button did not respond in Create New (Java) Class window. No classes is created, no error messages showed up.
Expected result : Create New Class window closed, new package and new class are created in project's explorer.
Error log generated in {workspace}/.metadata/.log file :


!ENTRY org.eclipse.ui 4 0 2011-02-08 13:00:39.506
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException
at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:193)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1546)
at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:1360)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:735)
at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:689)
at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:193)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1546)
at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:1360)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:707)
at org.eclipse.jface.wizard.WizardDialog$PageContainerFillLayout.layout(WizardDialog.java:278)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1546)
at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:1360)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:735)
at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:689)
at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:193)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1546)
at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:1360)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:735)
at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:689)
at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:193)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1546)
at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:1360)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:707)
at org.eclipse.swt.layout.FormLayout.layout(FormLayout.java:358)
at org.eclipse.swt.layout.FormLayout.layout(FormLayout.java:286)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1546)
at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:1360)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:735)
at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:689)
at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:193)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1546)
at org.eclipse.swt.widgets.Composite.layout(Composite.java:951)
at org.eclipse.swt.widgets.Composite.layout(Composite.java:909)
at org.eclipse.swt.widgets.Composite.layout(Composite.java:872)
at org.eclipse.jface.dialogs.TitleAreaDialog.layoutForNewMessage(TitleAreaDialog.java:473)
at org.eclipse.jface.dialogs.TitleAreaDialog.access$0(TitleAreaDialog.java:427)
at org.eclipse.jface.dialogs.TitleAreaDialog$1.handleEvent(TitleAreaDialog.java:166)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1282)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1263)
at org.eclipse.swt.widgets.Shell.resizeBounds(Shell.java:1579)
at org.eclipse.swt.widgets.Shell.setBounds(Shell.java:1632)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:707)
at org.eclipse.jface.window.Window.initializeBounds(Window.java:766)
at org.eclipse.jface.dialogs.Dialog.initializeBounds(Dialog.java:714)
at org.eclipse.jface.window.Window.create(Window.java:435)
at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
at org.eclipse.ui.internal.navigator.wizards.WizardShortcutAction.run(WizardShortcutAction.java:95)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3540)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3161)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574) 
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)


Solution :
PHPEclipse (1.2.3.200910091456PRD) plugin is also installed, which somehow generates bug when creating new Java class. Uninstall eclipse-phpeclipse.noarch will solve this problem.
Use yum command in linux console as root :
# yum remove eclipse-phpeclipse.noarch
Restart eclipse and problem solved.

<more>

No comments:

Post a Comment