Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » [SOLVED] Xtext editor crashes when deployed as part of product
[SOLVED] Xtext editor crashes when deployed as part of product [message #1720184] Fri, 15 January 2016 00:00 Go to next message
Jasper D. is currently offline Jasper D.Friend
Messages: 4
Registered: January 2016
Junior Member
Hi, I'm trying to make an Xtext 2.9 generated DSL editor work for an Eclipse 3 RCP application. The editor is working so far when running the *.ui project directly from Eclipse (Run as Eclipse Application).

However, when integrating the editor into an RCP app and running the product ("Launch an Eclipse application" from the product file) things get ugly.
As soon as a file with a associated file extension is opened, Eclipse shows a bunch of exceptions instead of the file.
    log4j:WARN No appenders could be found for logger (org.eclipse.xtext.ui.internal.Activator).
    log4j:WARN Please initialize the log4j system properly.
    
    !ENTRY org.eclipse.ui 4 4 2016-01-15 00:27:07.468
    !MESSAGE Unable to create part
    
    !ENTRY org.eclipse.ui 4 0 2016-01-15 00:27:07.470
    !MESSAGE Failed to create injector for com.example.model.Taxonomy ExtensionFactory: com.example.model.ui.TaxonomyExecutableExtensionFactory
    !STACK 1
    org.eclipse.core.runtime.CoreException: Failed to create injector for com.example.model.Taxonomy ExtensionFactory: com.example.model.ui.TaxonomyExecutableExtensionFactory
    	at org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory.create(AbstractGuiceAwareExecutableExtensionFactory.java:59)
    	at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:262)
    	at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
    	at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugin.java:293)
    	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    	at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:288)
    	at org.eclipse.ui.internal.registry.EditorDescriptor.createEditor(EditorDescriptor.java:235)
    	at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:328)
    	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPart(CompatibilityPart.java:279)
    	at org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPart(CompatibilityEditor.java:63)
    	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:317)
    	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)
    	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:898)
    	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:879)
    	at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:121)
    	at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:345)
    	at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:264)
    	at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162)
    	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:104)
    	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:73)
    	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:55)
    	at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:129)
    	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:971)
    	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:640)
    	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.PartServiceImpl$1.handleEvent(PartServiceImpl.java:99)
    	at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40)
    	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:186)
    	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145)
    	at org.eclipse.swt.widgets.Display.syncExec(Display.java:4761)
    	at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211)
    	at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36)
    	at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
    	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
    	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
    	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
    	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
    	at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
    	at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
    	at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
    	at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:85)
    	at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:59)
    	at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
    	at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:171)
    	at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:494)
    	at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:458)
    	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:724)
    	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1163)
    	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3234)
    	at org.eclipse.ui.internal.WorkbenchPage.access$25(WorkbenchPage.java:3149)
    	at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:3131)
    	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3126)
    	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3090)
    	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3071)
    	at org.eclipse.ui.ide.IDE.openEditorOnFileStore(IDE.java:1159)
    	at org.eclipse.ui.internal.ide.actions.OpenLocalFileAction.run(OpenLocalFileAction.java:97)
    	at org.eclipse.ui.internal.ide.actions.OpenLocalFileAction.run(OpenLocalFileAction.java:70)
    	at org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy.execute(ActionDelegateHandlerProxy.java:299)
    	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
    	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)
    	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:252)
    	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:234)
    	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
    	at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152)
    	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:493)
    	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:486)
    	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
    	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:799)
    	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:675)
    	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$7(HandledContributionItem.java:659)
    	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:592)
    	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4362)
    	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113)
    	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4180)
    	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3769)
    	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
    	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.example.app.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.RuntimeException: Failed to create injector for com.example.model.Taxonomy
    	at com.example.model.taxonomy.ui.internal.TaxonomyActivator.createInjector(TaxonomyActivator.java:71)
    	at com.example.model.taxonomy.ui.internal.TaxonomyActivator.getInjector(TaxonomyActivator.java:55)
    	at com.example.model.ui.TaxonomyExecutableExtensionFactory.getInjector(TaxonomyExecutableExtensionFactory.java:24)
    	at org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory.create(AbstractGuiceAwareExecutableExtensionFactory.java:51)
    	... 110 more
    Caused by: com.google.inject.CreationException: Guice creation errors:
    
    1) Error injecting method, java.lang.IllegalStateException: Missing contribution for type: org.eclipse.xtext.ui.containers.JavaProjectsState
      at org.eclipse.xtext.ui.shared.Access$InternalProviderForContribution.inject(Unknown Source)
      at org.eclipse.xtext.service.MethodBasedModule.configure(MethodBasedModule.java:75)
    
    1 error
    	at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:435)
    	at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:175)
    	at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:109)
    	at com.google.inject.Guice.createInjector(Guice.java:95)
    	at com.google.inject.Guice.createInjector(Guice.java:72)
    	at com.google.inject.Guice.createInjector(Guice.java:62)
    	at com.example.model.taxonomy.ui.internal.TaxonomyActivator.createInjector(TaxonomyActivator.java:67)
    	... 113 more
    Caused by: java.lang.IllegalStateException: Missing contribution for type: org.eclipse.xtext.ui.containers.JavaProjectsState
    	at org.eclipse.xtext.ui.shared.internal.SharedStateContributionRegistryImpl.getLazySingleContributedInstance(SharedStateContributionRegistryImpl.java:97)
    	at org.eclipse.xtext.ui.shared.Access$InternalProviderForContribution.inject(Access.java:62)
    	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 com.google.inject.internal.SingleMethodInjector$1.invoke(SingleMethodInjector.java:71)
    	at com.google.inject.internal.SingleMethodInjector.inject(SingleMethodInjector.java:90)
    	at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:110)
    	at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:75)
    	at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:73)
    	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024)
    	at com.google.inject.internal.MembersInjectorImpl.injectAndNotify(MembersInjectorImpl.java:73)
    	at com.google.inject.internal.Initializer$InjectableReference.get(Initializer.java:147)
    	at com.google.inject.internal.Initializer.injectAll(Initializer.java:92)
    	at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:173)
    	... 118 more
    !SUBENTRY 1 com.example.model.taxonomy.ui 4 0 2016-01-15 00:27:07.474
    !MESSAGE Failed to create injector for com.example.model.Taxonomy ExtensionFactory: com.example.model.ui.TaxonomyExecutableExtensionFactory
    !STACK 0
    java.lang.RuntimeException: Failed to create injector for com.example.model.Taxonomy
    	at com.example.model.taxonomy.ui.internal.TaxonomyActivator.createInjector(TaxonomyActivator.java:71)
    	at com.example.model.taxonomy.ui.internal.TaxonomyActivator.getInjector(TaxonomyActivator.java:55)
    	at com.example.model.ui.TaxonomyExecutableExtensionFactory.getInjector(TaxonomyExecutableExtensionFactory.java:24)
    	at org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory.create(AbstractGuiceAwareExecutableExtensionFactory.java:51)
    	at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:262)
    	at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
    	at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugin.java:293)
    	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    	at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:288)
    	at org.eclipse.ui.internal.registry.EditorDescriptor.createEditor(EditorDescriptor.java:235)
    	at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:328)
    	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPart(CompatibilityPart.java:279)
    	at org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPart(CompatibilityEditor.java:63)
    	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:317)
    	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)
    	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:898)
    	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:879)
    	at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:121)
    	at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:345)
    	at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:264)
    	at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162)
    	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:104)
    	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:73)
    	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:55)
    	at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:129)
    	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:971)
    	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:640)
    	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.PartServiceImpl$1.handleEvent(PartServiceImpl.java:99)
    	at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40)
    	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:186)
    	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145)
    	at org.eclipse.swt.widgets.Display.syncExec(Display.java:4761)
    	at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211)
    	at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36)
    	at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
    	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
    	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
    	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
    	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
    	at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
    	at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
    	at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
    	at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:85)
    	at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:59)
    	at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
    	at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:171)
    	at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:494)
    	at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:458)
    	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:724)
    	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1163)
    	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3234)
    	at org.eclipse.ui.internal.WorkbenchPage.access$25(WorkbenchPage.java:3149)
    	at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:3131)
    	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3126)
    	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3090)
    	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3071)
    	at org.eclipse.ui.ide.IDE.openEditorOnFileStore(IDE.java:1159)
    	at org.eclipse.ui.internal.ide.actions.OpenLocalFileAction.run(OpenLocalFileAction.java:97)
    	at org.eclipse.ui.internal.ide.actions.OpenLocalFileAction.run(OpenLocalFileAction.java:70)
    	at org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy.execute(ActionDelegateHandlerProxy.java:299)
    	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
    	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)
    	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:252)
    	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:234)
    	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
    	at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152)
    	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:493)
    	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:486)
    	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
    	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:799)
    	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:675)
    	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$7(HandledContributionItem.java:659)
    	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:592)
    	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4362)
    	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113)
    	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4180)
    	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3769)
    	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
    	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.example.app.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: com.google.inject.CreationException: Guice creation errors:
    
    1) Error injecting method, java.lang.IllegalStateException: Missing contribution for type: org.eclipse.xtext.ui.containers.JavaProjectsState
      at org.eclipse.xtext.ui.shared.Access$InternalProviderForContribution.inject(Unknown Source)
      at org.eclipse.xtext.service.MethodBasedModule.configure(MethodBasedModule.java:75)
    
    1 error
    	at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:435)
    	at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:175)
    	at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:109)
    	at com.google.inject.Guice.createInjector(Guice.java:95)
    	at com.google.inject.Guice.createInjector(Guice.java:72)
    	at com.google.inject.Guice.createInjector(Guice.java:62)
    	at com.example.model.taxonomy.ui.internal.TaxonomyActivator.createInjector(TaxonomyActivator.java:67)
    	... 113 more
    Caused by: java.lang.IllegalStateException: Missing contribution for type: org.eclipse.xtext.ui.containers.JavaProjectsState
    	at org.eclipse.xtext.ui.shared.internal.SharedStateContributionRegistryImpl.getLazySingleContributedInstance(SharedStateContributionRegistryImpl.java:97)
    	at org.eclipse.xtext.ui.shared.Access$InternalProviderForContribution.inject(Access.java:62)
    	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 com.google.inject.internal.SingleMethodInjector$1.invoke(SingleMethodInjector.java:71)
    	at com.google.inject.internal.SingleMethodInjector.inject(SingleMethodInjector.java:90)
    	at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:110)
    	at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:75)
    	at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:73)
    	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024)
    	at com.google.inject.internal.MembersInjectorImpl.injectAndNotify(MembersInjectorImpl.java:73)
    	at com.google.inject.internal.Initializer$InjectableReference.get(Initializer.java:147)
    	at com.google.inject.internal.Initializer.injectAll(Initializer.java:92)
    	at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:173)
    	... 118 more

I have no idea what causes this issue or how to fix it. Any ideas?


Best regards

[Updated on: Wed, 10 February 2016 17:07]

Report message to a moderator

Re: Xtext editor crashes when deployed as part of product [message #1720275 is a reply to message #1720184] Fri, 15 January 2016 17:46 Go to previous messageGo to next message
Jasper D. is currently offline Jasper D.Friend
Messages: 4
Registered: January 2016
Junior Member
Ok, I kinda found the cause.

Here is what I did:


  1. Create a new plug-in-based run configuration
  2. Auto add required plug-ins
  3. Add all plug-ins that are in the run configuration to the product via feature (it's a feature based product)

Now the exception is gone. The downside is, that some of these additional plug-ins make (unwanted) contributions to the UI of the RCP app.

org.eclipse.jdt.ui is required, not having this will result in the exception mentioned in my first post (IllegalStateException: Missing contribution for type: org.eclipse.xtext.ui.containers.JavaProjectsState).
Having it will add Java templates to the new project/file wizard as well as "Java Search" to the search dialog (Ctrl+H).
Some other plug-ins, such as org.eclipse.jdt.debug.ui which also makes unwanted UI contributions can be removed without any notable effects, while removing other plug-ins cause different exceptions (e.g. removing org.eclipse.search will cause a ClassNotFoundException).
There might be more things added to the UI, but since I use a very minimal RCP app here for testing, these remain to be discovered.

Now I'm wondering why there are dependencies on some UI components and if there is a way to get rid of these. Given the popularity of Xtext, I assume that there are quite a lot of people running Xtext based plug-ins inside standalone RCP apps, so I imagine that there is a solution/I'm doing something wrong here.


Best regards

Jasper

[Updated on: Fri, 15 January 2016 17:56]

Report message to a moderator

Re: Xtext editor crashes when deployed as part of product [message #1722994 is a reply to message #1720275] Wed, 10 February 2016 17:06 Go to previous messageGo to next message
Jasper D. is currently offline Jasper D.Friend
Messages: 4
Registered: January 2016
Junior Member
Well, documentation describes how to get rid of JDT: https://eclipse.org/Xtext/documentation/307_special_languages.html#java-independent-languages

You may run into a Sax Parser Exception exception after following the steps described in the documentation. This is most likely caused by calling `createInjectorAndDoEMFRegistration();` in a RCP application. Get rid of it, curse your coworkers and remove any JDT packages.

However, I think having no JDT dependencies by default (or at least some kind of switch during project creation/in MWE2 workflow) would be better.
Re: Xtext editor crashes when deployed as part of product [message #1733106 is a reply to message #1722994] Tue, 24 May 2016 05:24 Go to previous messageGo to next message
Anakreontas Mentis is currently offline Anakreontas MentisFriend
Messages: 85
Registered: October 2014
Member
I'm also getting the injector related error. Did you understand what causes it? Is it a missing dependency or incompatible library versions?

Regards
Re: Xtext editor crashes when deployed as part of product [message #1746320 is a reply to message #1722994] Wed, 26 October 2016 21:07 Go to previous messageGo to next message
Gerd  Wütherich is currently offline Gerd WütherichFriend
Messages: 12
Registered: July 2009
Junior Member
Hi Jasper,

I struggled with the same setup - fortunately I was able to remove most of the unwanted contributions. Nevertheless, I still have a (unwanted) Toolbar-Contribution ("Toogle Mark Occurences") when I open the XText-Editor.

Did you finally get rid of *all* unwanted UI contributions in your example RCP application?

Regards,
Gerd
Re: Xtext editor crashes when deployed as part of product [message #1746321 is a reply to message #1746320] Wed, 26 October 2016 21:13 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 11502
Registered: July 2009
Senior Member
Hi overriding configureMarkOccurencesAction in the Ui module and don't call super does not work?

Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Previous Topic:How can I force JvmInferrer to import a class I used in a body statement
Next Topic:Dealing with Eclipse XText syntax errors
Goto Forum:
  


Current Time: Mon Dec 18 04:58:14 GMT 2017

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

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