title: Eclipse RCP : Error creating a plug-in based product configuration
body: <p>I am new to RCP development and I've problem with creating product configuration.
  IDE: Eclipse Mars 4.5.1</p>
  
  <p>I created an Eclipse plug-in project named "com.ex.mail" using predefined template "RCP 3.x Mail Template".
  This plug-in work (Launching a separete Eclipse application)!</p>
  
  <p>After that, I created a new product configuration ("mail.product") in the same plugin project.</p>
  
  <p>This is mail.product:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;?pde version="3.5"?&gt;
  &lt;product name="todo" id="com.ex.mail.product1" application="com.ex.mail.application" useFeatures="false" includeLaunchers="true"&gt;
     &lt;configIni use="default"&gt;
     &lt;/configIni&gt;
     &lt;launcherArgs&gt;
        &lt;programArgs&gt;-clean -clearPersistedState
        &lt;/programArgs&gt;
        &lt;vmArgsMac&gt;-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts
        &lt;/vmArgsMac&gt;
     &lt;/launcherArgs&gt;
     &lt;launcher&gt;
        &lt;solaris/&gt;
        &lt;win useIco="false"&gt;
           &lt;bmp/&gt;
        &lt;/win&gt;
     &lt;/launcher&gt;
     &lt;vm&gt;
     &lt;/vm&gt;
     &lt;plugins&gt;
        &lt;plugin id="com.ex.mail"/&gt;
        &lt;plugin id="com.ibm.icu"/&gt;
        &lt;plugin id="javax.annotation"/&gt;
        &lt;plugin id="javax.inject"/&gt;
        &lt;plugin id="javax.xml"/&gt;
        &lt;plugin id="org.apache.batik.css"/&gt;
        &lt;plugin id="org.apache.batik.util"/&gt;
        &lt;plugin id="org.apache.batik.util.gui"/&gt;
        &lt;plugin id="org.apache.commons.jxpath"/&gt;
        &lt;plugin id="org.eclipse.core.commands"/&gt;
        &lt;plugin id="org.eclipse.core.contenttype"/&gt;
        &lt;plugin id="org.eclipse.core.databinding"/&gt;
        &lt;plugin id="org.eclipse.core.databinding.observable"/&gt;
        &lt;plugin id="org.eclipse.core.databinding.property"/&gt;
        &lt;plugin id="org.eclipse.core.expressions"/&gt;
        &lt;plugin id="org.eclipse.core.jobs"/&gt;
        &lt;plugin id="org.eclipse.core.runtime"/&gt;
        &lt;plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/&gt;
        &lt;plugin id="org.eclipse.e4.core.commands"/&gt;
        &lt;plugin id="org.eclipse.e4.core.contexts"/&gt;
        &lt;plugin id="org.eclipse.e4.core.di"/&gt;
        &lt;plugin id="org.eclipse.e4.core.di.annotations"/&gt;
        &lt;plugin id="org.eclipse.e4.core.di.extensions"/&gt;
        &lt;plugin id="org.eclipse.e4.core.services"/&gt;
        &lt;plugin id="org.eclipse.e4.emf.xpath"/&gt;
        &lt;plugin id="org.eclipse.e4.ui.bindings"/&gt;
        &lt;plugin id="org.eclipse.e4.ui.css.core"/&gt;
        &lt;plugin id="org.eclipse.e4.ui.css.swt"/&gt;
        &lt;plugin id="org.eclipse.e4.ui.css.swt.theme"/&gt;
        &lt;plugin id="org.eclipse.e4.ui.di"/&gt;
        &lt;plugin id="org.eclipse.e4.ui.model.workbench"/&gt;
        &lt;plugin id="org.eclipse.e4.ui.services"/&gt;
        &lt;plugin id="org.eclipse.e4.ui.widgets"/&gt;
        &lt;plugin id="org.eclipse.e4.ui.workbench"/&gt;
        &lt;plugin id="org.eclipse.e4.ui.workbench.addons.swt"/&gt;
        &lt;plugin id="org.eclipse.e4.ui.workbench.renderers.swt"/&gt;
        &lt;plugin id="org.eclipse.e4.ui.workbench.swt"/&gt;
        &lt;plugin id="org.eclipse.e4.ui.workbench3"/&gt;
        &lt;plugin id="org.eclipse.emf.common"/&gt;
        &lt;plugin id="org.eclipse.emf.ecore"/&gt;
        &lt;plugin id="org.eclipse.emf.ecore.change"/&gt;
        &lt;plugin id="org.eclipse.emf.ecore.xmi"/&gt;
        &lt;plugin id="org.eclipse.equinox.app"/&gt;
        &lt;plugin id="org.eclipse.equinox.common"/&gt;
        &lt;plugin id="org.eclipse.equinox.ds"/&gt;
        &lt;plugin id="org.eclipse.equinox.preferences"/&gt;
        &lt;plugin id="org.eclipse.equinox.registry"/&gt;
        &lt;plugin id="org.eclipse.equinox.util"/&gt;
        &lt;plugin id="org.eclipse.help"/&gt;
        &lt;plugin id="org.eclipse.jface"/&gt;
        &lt;plugin id="org.eclipse.jface.databinding"/&gt;
        &lt;plugin id="org.eclipse.osgi"/&gt;
        &lt;plugin id="org.eclipse.osgi.compatibility.state" fragment="true"/&gt;
        &lt;plugin id="org.eclipse.osgi.services"/&gt;
        &lt;plugin id="org.eclipse.swt"/&gt;
        &lt;plugin id="org.eclipse.swt.win32.win32.x86_64" fragment="true"/&gt;
        &lt;plugin id="org.eclipse.ui"/&gt;
        &lt;plugin id="org.eclipse.ui.workbench"/&gt;
        &lt;plugin id="org.w3c.css.sac"/&gt;
        &lt;plugin id="org.w3c.dom.events"/&gt;
        &lt;plugin id="org.w3c.dom.smil"/&gt;
        &lt;plugin id="org.w3c.dom.svg"/&gt;
     &lt;/plugins&gt;
     &lt;configurations&gt;
        &lt;plugin id="com.ex.mail" autoStart="false" startLevel="5" /&gt;
        &lt;plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="0" /&gt;
        &lt;plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" /&gt;
        &lt;plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="2" /&gt;
        &lt;plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="2" /&gt;
        &lt;plugin id="org.eclipse.equinox.p2.reconciler.dropins" autoStart="true" startLevel="0" /&gt;
        &lt;plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" /&gt;
     &lt;/configurations&gt;
  &lt;/product&gt;
  </code></pre>
  
  <p>When I launch RCP application using link in tab "Overview" of mail.product I've this error:</p>
  
  <pre><code>!ENTRY org.eclipse.e4.ui.workbench.swt 4 2 2016-01-11 12:19:58.277
  !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.e4.ui.workbench.swt".
  !STACK 0
  org.eclipse.e4.core.di.InjectionException: java.lang.NullPointerException
      at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:68)
      at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:898)
      at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:121)
      at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:86)
      at org.eclipse.e4.core.contexts.ContextInjectionFactory.inject(ContextInjectionFactory.java:73)
      at org.eclipse.ui.internal.Workbench.createWorkbenchWindow(Workbench.java:1486)
      at org.eclipse.ui.internal.Workbench.getActiveWorkbenchWindow(Workbench.java:1460)
      at org.eclipse.ui.internal.services.WorkbenchSourceProvider.updateActiveShell(WorkbenchSourceProvider.java:944)
      at org.eclipse.ui.internal.services.WorkbenchSourceProvider.getCurrentState(WorkbenchSourceProvider.java:138)
      at org.eclipse.ui.internal.services.WorkbenchSourceProvider$6.handleEvent(WorkbenchSourceProvider.java:704)
      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1266)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1112)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1137)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1122)
      at org.eclipse.swt.widgets.Decorations.WM_ACTIVATE(Decorations.java:1673)
      at org.eclipse.swt.widgets.Shell.WM_ACTIVATE(Shell.java:2193)
      at org.eclipse.swt.widgets.Control.windowProc(Control.java:4673)
      at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:339)
      at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1633)
      at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2117)
      at org.eclipse.swt.widgets.Display.windowProc(Display.java:5050)
      at org.eclipse.swt.internal.win32.OS.BringWindowToTop(Native Method)
      at org.eclipse.swt.widgets.Decorations.bringToTop(Decorations.java:230)
      at org.eclipse.swt.widgets.Shell.open(Shell.java:1244)
      at org.eclipse.e4.ui.workbench.renderers.swt.WBWRenderer.postProcess(WBWRenderer.java:694)
      at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:658)
      at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:746)
      at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$0(PartRenderingEngine.java:717)
      at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:711)
      at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:695)
      at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1057)
      at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
      at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
      at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
      at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)
      at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
      at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
      at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
      at com.ex.mail.Application.start(Application.java:20)
      at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
      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:669)
      at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
      at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
      at org.eclipse.equinox.launcher.Main.main(Main.java:1488)
  Caused by: java.lang.NullPointerException
      at org.eclipse.ui.internal.WorkbenchPage.setPerspective(WorkbenchPage.java:4057)
      at org.eclipse.ui.internal.WorkbenchWindow.setup(WorkbenchWindow.java:737)
      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)
      ... 53 more
  
  !ENTRY org.eclipse.e4.ui.workbench 4 0 2016-01-11 12:19:58.280
  !MESSAGE Exception occurred while rendering: org.eclipse.e4.ui.model.application.ui.basic.impl.TrimmedWindowImpl@67545b57 (elementId: IDEWindow, tags: [topLevel], contributorURI: platform:/plugin/org.eclipse.ui.workbench) (widget: Shell {todo}, renderer: org.eclipse.e4.ui.workbench.renderers.swt.WBWRenderer@32f61a31, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: null, iconURI: null, tooltip: null, context: TrimmedWindowImpl (IDEWindow) Context, variables: [], x: 125, y: 125, width: 600, height: 400)
  !STACK 0
  org.eclipse.e4.core.di.InjectionException: java.lang.NullPointerException
      at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:68)
      at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:898)
      at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:121)
      at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:86)
      at org.eclipse.e4.core.contexts.ContextInjectionFactory.inject(ContextInjectionFactory.java:73)
      at org.eclipse.ui.internal.Workbench.createWorkbenchWindow(Workbench.java:1486)
      at org.eclipse.ui.internal.Workbench.getActiveWorkbenchWindow(Workbench.java:1460)
      at org.eclipse.ui.internal.services.WorkbenchSourceProvider.updateActiveShell(WorkbenchSourceProvider.java:944)
      at org.eclipse.ui.internal.services.WorkbenchSourceProvider.getCurrentState(WorkbenchSourceProvider.java:138)
      at org.eclipse.ui.internal.services.WorkbenchSourceProvider$6.handleEvent(WorkbenchSourceProvider.java:704)
      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1266)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1112)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1137)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1122)
      at org.eclipse.swt.widgets.Decorations.WM_ACTIVATE(Decorations.java:1673)
      at org.eclipse.swt.widgets.Shell.WM_ACTIVATE(Shell.java:2193)
      at org.eclipse.swt.widgets.Control.windowProc(Control.java:4673)
      at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:339)
      at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1633)
      at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2117)
      at org.eclipse.swt.widgets.Display.windowProc(Display.java:5050)
      at org.eclipse.swt.internal.win32.OS.BringWindowToTop(Native Method)
      at org.eclipse.swt.widgets.Decorations.bringToTop(Decorations.java:230)
      at org.eclipse.swt.widgets.Shell.open(Shell.java:1244)
      at org.eclipse.e4.ui.workbench.renderers.swt.WBWRenderer.postProcess(WBWRenderer.java:694)
      at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:658)
      at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:746)
      at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$0(PartRenderingEngine.java:717)
      at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:711)
      at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:695)
      at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1057)
      at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
      at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
      at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
      at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)
      at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
      at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
      at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
      at com.ex.mail.Application.start(Application.java:20)
      at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
      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:669)
      at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
      at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
      at org.eclipse.equinox.launcher.Main.main(Main.java:1488)
  Caused by: java.lang.NullPointerException
      at org.eclipse.ui.internal.WorkbenchPage.setPerspective(WorkbenchPage.java:4057)
      at org.eclipse.ui.internal.WorkbenchWindow.setup(WorkbenchWindow.java:737)
      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)
      ... 53 more
  </code></pre>
  
  <p>Suggest?
  Thanks</p>