Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Unhandled event loop exception --> java.lang.NullPointerException
Unhandled event loop exception --> java.lang.NullPointerException [message #218318] Thu, 22 June 2006 14:40 Go to next message
Eclipse UserFriend
Originally posted by: kja.eswar.gmail.com

Hi all,


I'm just trying to run through the GEF shapes example, and I'm blocked on a strange behavior. I just imported the src into a new plug in project which I have created. I am just trying to run it and I get the following error.

Unhandled event loop exception
Reason:
java.lang.NullPointerException

In the .log file, I find the exception shown at the end of this messasge. I'm running Eclipse 3.1 . Can someone give me a hint? I'm totally lost!
Thanks in advance,
Eswar

PLUGIN.XML

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>



extensions="shapes"
icon="shapes.gif"
default="true"
class="org.eclipse.gef.examples.shapes.ShapesEditor"
contributorClass=" org.eclipse.gef.examples.shapes.ShapesEditorActionBarContrib utor "
id="GEF Shapes Editor">




parentCategory="org.eclipse.ui.Examples"
id="org.eclipse.gef.examples"/>

icon="shapes.gif"
category="org.eclipse.ui.Examples/org.eclipse.gef.examples"
class="org.eclipse.gef.examples.shapes.ShapesCreationWizard "
id="org.eclipse.gef.examples.shapes.ShapesCreationWizard">





LOG ENTRY

!SESSION 2006-06-22 19:42:03.562 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.4.2_06
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments: -product org.eclipse.sdk.ide -pdelaunch
Command-line arguments: -product org.eclipse.sdk.ide -data D:\eclipse\TestProjects\runtime-EclipseApplication -dev file:D:/eclipse/TestProjects/TestEditor/.metadata/.plugins/o rg.eclipse.pde.core/Eclipse Application/dev.properties -pdelaunch -os win32 -ws win32 -arch x86

!ENTRY org.eclipse.ui 4 4 2006-06-22 19:42:33.218
!MESSAGE Unhandled event loop exception

!ENTRY org.eclipse.ui 4 0 2006-06-22 19:42:33.375
!MESSAGE java.lang.NullPointerException
!STACK 0
java.lang.NullPointerException
at org.eclipse.ui.internal.ide.dialogs.CreateLinkedResourceGrou p.createStatus(CreateLinkedResourceGroup.java:232)
at org.eclipse.ui.internal.ide.dialogs.CreateLinkedResourceGrou p.validateLinkLocation(CreateLinkedResourceGroup.java:411)
at org.eclipse.ui.dialogs.WizardNewFileCreationPage.validateLin kedResource(WizardNewFileCreationPage.java:530)
at org.eclipse.ui.dialogs.WizardNewFileCreationPage.validatePag e(WizardNewFileCreationPage.java:567)
at org.eclipse.gef.examples.shapes.ShapesCreationWizard$Creatio nPage.validatePage(ShapesCreationWizard.java:155)
at org.eclipse.ui.dialogs.WizardNewFileCreationPage.handleEvent (WizardNewFileCreationPage.java:460)
at org.eclipse.ui.internal.ide.misc.ResourceAndContainerGroup.h andleEvent(ResourceAndContainerGroup.java:250)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:867)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:848)
at org.eclipse.swt.widgets.Text.wmCommandChild(Text.java:2061)
at org.eclipse.swt.widgets.Control.WM_COMMAND(Control.java:3164 )
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3041 )
at org.eclipse.swt.widgets.Display.windowProc(Display.java:3706 )
at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:158 0)
at org.eclipse.swt.widgets.Text.callWindowProc(Text.java:131)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3123 )
at org.eclipse.swt.widgets.Text.windowProc(Text.java:1777)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:3706 )
at org.eclipse.swt.internal.win32.OS.SetWindowTextW(Native Method)
at org.eclipse.swt.internal.win32.OS.SetWindowText(OS.java:2355 )
at org.eclipse.swt.widgets.Text.setText(Text.java:1593)
at org.eclipse.ui.internal.ide.misc.ResourceAndContainerGroup.s etResource(ResourceAndContainerGroup.java:293)
at org.eclipse.ui.dialogs.WizardNewFileCreationPage.setFileName (WizardNewFileCreationPage.java:516)
at org.eclipse.gef.examples.shapes.ShapesCreationWizard$Creatio nPage.createControl(ShapesCreationWizard.java:91)
at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.ja va:179)
at org.eclipse.jface.wizard.WizardDialog.createPageControls(Wiz ardDialog.java:611)
at org.eclipse.jface.wizard.WizardDialog.setWizard(WizardDialog .java:965)
at org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDi alog.java:1016)
at org.eclipse.jface.wizard.WizardDialog.access$2(WizardDialog. java:1013)
at org.eclipse.jface.wizard.WizardDialog$4.run(WizardDialog.jav a:1003)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog. java:1001)
at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDial og.java:753)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDi alog.java:345)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.jav a:556)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:90)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3080)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2713)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:809 )
at org.eclipse.jface.window.Window.open(Window.java:787)
at org.eclipse.ui.actions.NewExampleAction.run(NewExampleAction .java:120)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:996 )
at org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:538)
at org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:488)
at org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3080)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2713)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:103)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)
Re: Unhandled event loop exception --> java.lang.NullPointerException [message #218428 is a reply to message #218318] Fri, 23 June 2006 20:55 Go to previous messageGo to next message
Steven R. Shaw is currently offline Steven R. ShawFriend
Messages: 128
Registered: July 2009
Senior Member
Did you try getting the source from CVS directly logging in anonymously?
(dev.eclipse.org : /cvsroot/tools )

-Steve

"Eswar K" <kja.eswar@gmail.com> wrote in message
news:10482726.1150987257353.JavaMail.root@cp1.javalobby.org...
> Hi all,
>
>
> I'm just trying to run through the GEF shapes example, and I'm blocked on
a strange behavior. I just imported the src into a new plug in project which
I have created. I am just trying to run it and I get the following error.
>
> Unhandled event loop exception
> Reason:
> java.lang.NullPointerException
>
> In the .log file, I find the exception shown at the end of this messasge.
I'm running Eclipse 3.1 . Can someone give me a hint? I'm totally lost!
> Thanks in advance,
> Eswar
>
> PLUGIN.XML
>
> <?xml version="1.0" encoding="UTF-8"?>
> <?eclipse version="3.0"?>
>
>
>
> extensions="shapes"
> icon="shapes.gif"
> default="true"
> class="org.eclipse.gef.examples.shapes.ShapesEditor"
>
contributorClass="org.eclipse.gef.examples.shapes.ShapesEditorActionBarContr
ibutor"
> id="GEF Shapes Editor">
>
>
>
>
> parentCategory="org.eclipse.ui.Examples"
> id="org.eclipse.gef.examples"/>
>
> icon="shapes.gif"
> category="org.eclipse.ui.Examples/org.eclipse.gef.examples"
> class="org.eclipse.gef.examples.shapes.ShapesCreationWizard "
> id="org.eclipse.gef.examples.shapes.ShapesCreationWizard">
>
>
>
>
>
> LOG ENTRY
>
> !SESSION 2006-06-22
19:42:03.562 -----------------------------------------------
> eclipse.buildId=unknown
> java.version=1.4.2_06
> java.vendor=Sun Microsystems Inc.
> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
> Framework arguments: -product org.eclipse.sdk.ide -pdelaunch
> Command-line arguments: -product org.eclipse.sdk.ide -data
D:\eclipse\TestProjects\runtime-EclipseApplication -dev
file:D:/eclipse/TestProjects/TestEditor/.metadata/.plugins/o rg.eclipse.pde.core/Eclipse
Application/dev.properties -pdelaunch -os win32 -ws win32 -arch x86
>
> !ENTRY org.eclipse.ui 4 4 2006-06-22 19:42:33.218
> !MESSAGE Unhandled event loop exception
>
> !ENTRY org.eclipse.ui 4 0 2006-06-22 19:42:33.375
> !MESSAGE java.lang.NullPointerException
> !STACK 0
> java.lang.NullPointerException
> at
org.eclipse.ui.internal.ide.dialogs.CreateLinkedResourceGrou p.createStatus(C
reateLinkedResourceGroup.java:232)
> at
org.eclipse.ui.internal.ide.dialogs.CreateLinkedResourceGrou p.validateLinkLo
cation(CreateLinkedResourceGroup.java:411)
> at
org.eclipse.ui.dialogs.WizardNewFileCreationPage.validateLin kedResource(Wiza
rdNewFileCreationPage.java:530)
> at
org.eclipse.ui.dialogs.WizardNewFileCreationPage.validatePag e(WizardNewFileC
reationPage.java:567)
> at
org.eclipse.gef.examples.shapes.ShapesCreationWizard$Creatio nPage.validatePa
ge(ShapesCreationWizard.java:155)
> at
org.eclipse.ui.dialogs.WizardNewFileCreationPage.handleEvent (WizardNewFileCr
eationPage.java:460)
> at
org.eclipse.ui.internal.ide.misc.ResourceAndContainerGroup.h andleEvent(Resou
rceAndContainerGroup.java:250)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:867)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:848)
> at org.eclipse.swt.widgets.Text.wmCommandChild(Text.java:2061)
> at org.eclipse.swt.widgets.Control.WM_COMMAND(Control.java:3164 )
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3041 )
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:3706 )
> at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method)
> at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:158 0)
> at org.eclipse.swt.widgets.Text.callWindowProc(Text.java:131)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3123 )
> at org.eclipse.swt.widgets.Text.windowProc(Text.java:1777)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:3706 )
> at org.eclipse.swt.internal.win32.OS.SetWindowTextW(Native Method)
> at org.eclipse.swt.internal.win32.OS.SetWindowText(OS.java:2355 )
> at org.eclipse.swt.widgets.Text.setText(Text.java:1593)
> at
org.eclipse.ui.internal.ide.misc.ResourceAndContainerGroup.s etResource(Resou
rceAndContainerGroup.java:293)
> at
org.eclipse.ui.dialogs.WizardNewFileCreationPage.setFileName (WizardNewFileCr
eationPage.java:516)
> at
org.eclipse.gef.examples.shapes.ShapesCreationWizard$Creatio nPage.createCont
rol(ShapesCreationWizard.java:91)
> at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.ja va:179)
> at
org.eclipse.jface.wizard.WizardDialog.createPageControls(Wiz ardDialog.java:6
11)
> at org.eclipse.jface.wizard.WizardDialog.setWizard(WizardDialog .java:965)
> at
org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDi alog.java:1016)
> at org.eclipse.jface.wizard.WizardDialog.access$2(WizardDialog. java:1013)
> at org.eclipse.jface.wizard.WizardDialog$4.run(WizardDialog.jav a:1003)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
> at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog. java:1001)
> at
org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDial og.java:753)
> at
org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDi alog.java:345)
> at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.jav a:556)
> at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:90)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3080)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2713)
> at org.eclipse.jface.window.Window.runEventLoop(Window.java:809 )
> at org.eclipse.jface.window.Window.open(Window.java:787)
> at org.eclipse.ui.actions.NewExampleAction.run(NewExampleAction .java:120)
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:996 )
> at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(Action
ContributionItem.java:538)
> at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionI
tem.java:488)
> at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContribu
tionItem.java:400)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3080)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2713)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1699)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
> at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:367)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
> at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:103)
> at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.
java:226)
> at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:376)
> at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:163)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334 )
> at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
> at org.eclipse.core.launcher.Main.run(Main.java:973)
> at org.eclipse.core.launcher.Main.main(Main.java:948)
Re: Unhandled event loop exception --> java.lang.NullPointerException [message #218482 is a reply to message #218428] Mon, 26 June 2006 13:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.chris-lott.org

The "unhandled event loop exception" is the standard message that I see
when my plugin code messes up. I suspect the platform is just fine, and
the shapes example has an issue. I recommend starting a runtime workspace
with the plugin in debug mode, setting a Java exception breakpoint on
NullPointerException, and repeating what you have done to reveal the
failure. This should show you exactly where the shapes example is doing
something it should not. It may also help if you specify in your message
here exactly what version of the shapes example you are using. Hope this
helps.

chris...
Re: Unhandled event loop exception --> java.lang.NullPointerException [message #218753 is a reply to message #218482] Thu, 29 June 2006 08:32 Go to previous message
Eclipse UserFriend
Originally posted by: kja.eswar.gmail.com

Chris,

I agree with you. The platform is just fine. What I was doing is that I had created a new project and imported the whole source code, resolved all the classpath issues and then I was running it. This was when I was getting the error.

However I found a simple way of importing the code, however I did not find it documented anywhere in the documentation except for one of the forums. For importing the code of plugins, I imported using Import->As Source Project. After this the code ran absolutely fine..

Chris, thanks for your inputs, otherwise too.

Eswar
Previous Topic:setting a new model in an opened editor
Next Topic:GEF editor in Eclipse RCP
Goto Forum:
  


Current Time: Fri Mar 29 08:01:10 GMT 2024

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

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

Back to the top