Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » NPE using the live editor
NPE using the live editor [message #697669] Sun, 17 July 2011 16:57 Go to next message
Eclipse User
Originally posted by: Jonas Helming

Hi,
I am starting a very basic e4 Application. The workbench model only
contains one TrimmedWindow and a Binding Context. The application starts
fine, but when I add the liveeditor to my launch config, I get an NPE on
start-up (see below). It seems that the EHandlerService is null. e4 core
service and commands are part of the launch config.
any ideas?
Cheers
Jonas

Affected Line:
EHandlerService hs = (EHandlerService)
context.get(EHandlerService.class.getName());

Exception:
java.lang.NullPointerException
at
org.eclipse.e4.ui.internal.workbench.E4Workbench.processHierarchy(E4Workbench.java:191)
at
org.eclipse.e4.ui.internal.workbench.E4Workbench.init(E4Workbench.java:115)
at
org.eclipse.e4.ui.internal.workbench.E4Workbench.<init>(E4Workbench.java:70)
at
org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:288)
at
org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:130)
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:344)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
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.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Re: NPE using the live editor [message #699877 is a reply to message #697669] Fri, 22 July 2011 14:17 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5434
Registered: July 2009
Senior Member
Is your Application.e4xmi is missing the default addons?

Tom

Am 17.07.11 18:57, schrieb Jonas Helming:
> Hi,
> I am starting a very basic e4 Application. The workbench model only
> contains one TrimmedWindow and a Binding Context. The application starts
> fine, but when I add the liveeditor to my launch config, I get an NPE on
> start-up (see below). It seems that the EHandlerService is null. e4 core
> service and commands are part of the launch config.
> any ideas?
> Cheers
> Jonas
>
> Affected Line:
> EHandlerService hs = (EHandlerService)
> context.get(EHandlerService.class.getName());
>
> Exception:
> java.lang.NullPointerException
> at
> org.eclipse.e4.ui.internal.workbench.E4Workbench.processHierarchy(E4Workbench.java:191)
>
> at
> org.eclipse.e4.ui.internal.workbench.E4Workbench.init(E4Workbench.java:115)
> at
> org.eclipse.e4.ui.internal.workbench.E4Workbench.<init>(E4Workbench.java:70)
>
> at
> org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:288)
>
> at
> org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:130)
>
> 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:344)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
>
> 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.equinox.launcher.Main.invokeFramework(Main.java:622)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Re: NPE using the live editor [message #701076 is a reply to message #699877] Sun, 24 July 2011 15:03 Go to previous message
Eclipse User
Originally posted by: Jonas Helming

Thanks Tom, that helped! I added the following addons (the can be copied
from the template by creating a new e4 project)

<addons xmi:id="_xp_mhLYDEeC0lu-qC79bNA"
elementId="org.eclipse.e4.core.commands.service"
contributionURI="platform:/plugin/org.eclipse.e4.core.commands/org.eclipse.e4.core.commands.CommandServiceAddon"/>
<addons xmi:id="_xp_mhbYDEeC0lu-qC79bNA"
elementId="org.eclipse.e4.ui.contexts.service"
contributionURI="platform:/plugin/org.eclipse.e4.ui.services/org.eclipse.e4.ui.services.ContextServiceAddon"/>
<addons xmi:id="_xp_mhrYDEeC0lu-qC79bNA"
elementId="org.eclipse.e4.ui.bindings.service"
contributionURI="platform:/plugin/org.eclipse.e4.ui.bindings/org.eclipse.e4.ui.bindings.BindingServiceAddon"/>
<addons xmi:id="_xp_mh7YDEeC0lu-qC79bNA"
elementId="org.eclipse.e4.ui.workbench.commands.model"
contributionURI="platform:/plugin/org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.CommandProcessingAddon"/>
<addons xmi:id="_xp_miLYDEeC0lu-qC79bNA"
elementId="org.eclipse.e4.ui.workbench.contexts.model"
contributionURI="platform:/plugin/org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.ContextProcessingAddon"/>
<addons xmi:id="_xp_mibYDEeC0lu-qC79bNA"
elementId="org.eclipse.e4.ui.workbench.bindings.model"
contributionURI="platform:/plugin/org.eclipse.e4.ui.workbench.swt/org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon"/>

Am 22.07.2011 16:17, schrieb Tom Schindl:
> Is your Application.e4xmi is missing the default addons?
>
> Tom
>
> Am 17.07.11 18:57, schrieb Jonas Helming:
>> Hi,
>> I am starting a very basic e4 Application. The workbench model only
>> contains one TrimmedWindow and a Binding Context. The application starts
>> fine, but when I add the liveeditor to my launch config, I get an NPE on
>> start-up (see below). It seems that the EHandlerService is null. e4 core
>> service and commands are part of the launch config.
>> any ideas?
>> Cheers
>> Jonas
>>
>> Affected Line:
>> EHandlerService hs = (EHandlerService)
>> context.get(EHandlerService.class.getName());
>>
>> Exception:
>> java.lang.NullPointerException
>> at
>> org.eclipse.e4.ui.internal.workbench.E4Workbench.processHierarchy(E4Workbench.java:191)
>>
>> at
>> org.eclipse.e4.ui.internal.workbench.E4Workbench.init(E4Workbench.java:115)
>> at
>> org.eclipse.e4.ui.internal.workbench.E4Workbench.<init>(E4Workbench.java:70)
>>
>> at
>> org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:288)
>>
>> at
>> org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:130)
>>
>> 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:344)
>>
>> at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
>>
>> 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.equinox.launcher.Main.invokeFramework(Main.java:622)
>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
>> at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
>> at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
>
Previous Topic:Information on Menus, Contribution, Handlers, Commands, etc.
Next Topic:(no subject)
Goto Forum:
  


Current Time: Fri Oct 31 09:57:44 GMT 2014

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

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