Community
Participate
Working Groups
!SESSION 2012-11-27 10:52:52.814 ----------------------------------------------- eclipse.buildId=unknown java.version=1.6.0_22 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE Framework arguments: -product com.example.e4.rcp.todo.todo -clearPersistedState Command-line arguments: -product com.example.e4.rcp.todo.todo -data C:\Users\l.yildirim\schulung/../runtime-todo.product -dev file:C:/Users/l.yildirim/schulung/.metadata/.plugins/org.eclipse.pde.core/todo.product/dev.properties -os win32 -ws win32 -arch x86_64 -consoleLog -clearPersistedState !ENTRY org.eclipse.e4.ui.workbench 4 0 2012-11-27 10:52:55.622 !MESSAGE Unable to create class 'org.eclipse.e4.ui.internal.workbench.addons.ContextProcessingAddon' from bundle '43' !STACK 0 org.eclipse.e4.core.di.InjectionException: java.lang.NullPointerException: The name of a context cannot be null at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:63) at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:859) at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:111) at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:319) at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:253) at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:185) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:105) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:71) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:49) at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:254) at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:132) 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:353) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180) 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:629) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584) at org.eclipse.equinox.launcher.Main.run(Main.java:1438) at org.eclipse.equinox.launcher.Main.main(Main.java:1414) Caused by: java.lang.NullPointerException: The name of a context cannot be null at org.eclipse.core.commands.contexts.Context.define(Context.java:140) at org.eclipse.e4.ui.internal.workbench.addons.ContextProcessingAddon.defineContexts(ContextProcessingAddon.java:65) at org.eclipse.e4.ui.internal.workbench.addons.ContextProcessingAddon.defineContexts(ContextProcessingAddon.java:69) at org.eclipse.e4.ui.internal.workbench.addons.ContextProcessingAddon.defineContexts(ContextProcessingAddon.java:54) at org.eclipse.e4.ui.internal.workbench.addons.ContextProcessingAddon.init(ContextProcessingAddon.java:47) 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.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56) ... 23 more
To add a little description: org.eclipse.e4.core.di.InjectionException: java.lang.NullPointerException: The name of a context cannot be The bug is asking for a improved error message and context is a bit misleading. The error is actually thrown by a Binding Context which has no name in the application model. So a better error message would be: org.eclipse.e4.core.di.InjectionException: java.lang.NullPointerException: The name of a binding context cannot be null.
(In reply to comment #1) > So a better error message would be: > > org.eclipse.e4.core.di.InjectionException: java.lang.NullPointerException: > The name of a binding context cannot be null. The ContextProcessingAddon should either check for null or catch the NPE. Then it should log the condition. NPE wasn't really a good choice for that exception coming from the core Context object, it should have been something like IllegalArgumentException. PW
Proposed fix, error message will improve if Bug 421968 is also fixed. https://git.eclipse.org/r/18501
Released as http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=995063c17c006aa3a837bf55692db5a22761c9e7 Thanks Lars PW
Verified in Build id: I20131211-2000 This makes my life as RCP trainer easier, if participants made an error in their keybinding definitions.