Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frequent Guice configuration errors #1321

Closed
reteprelief opened this issue Jun 15, 2018 · 8 comments
Closed

Frequent Guice configuration errors #1321

reteprelief opened this issue Jun 15, 2018 · 8 comments

Comments

@reteprelief
Copy link
Contributor

reteprelief commented Jun 15, 2018

requires #1467

When working with Resolute libraries or other models I get lots of IWorkbench was not bound errors. It did notice that on occasion there is a reference to the org.osate.xtext.aadl2.properties.ui.PropertiesExecutableExtensionFactory
In a session tonight the number in front of the ERROR line for PropertiesExecutableExtensionFactory went as high as 84698 (see example at the end)

0 [main] ERROR org.osate.xtext.aadl2.properties.ui.PropertiesExecutableExtensionFactory - Guice configuration errors:

  1. No implementation for org.eclipse.ui.IWorkbench was bound.
    while locating org.eclipse.ui.IWorkbench
    for field at org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator.workbench(Unknown Source)
    while locating org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator

1 error
com.google.inject.ConfigurationException: Guice configuration errors:

  1. No implementation for org.eclipse.ui.IWorkbench was bound.
    while locating org.eclipse.ui.IWorkbench
    for field at org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator.workbench(Unknown Source)
    while locating org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator

1 error
at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1004)
at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:961)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1013)
at org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory.create(AbstractGuiceAwareExecutableExtensionFactory.java:52)
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.ide.registry.MarkerHelpRegistry.hasResolution(MarkerHelpRegistry.java:175)
at org.eclipse.ui.internal.ide.registry.MarkerHelpRegistry.hasResolutions(MarkerHelpRegistry.java:151)
at org.eclipse.ui.views.markers.MarkerField.annotateImage(MarkerField.java:76)
at org.eclipse.ui.internal.views.markers.MarkerProblemSeverityAndMessageField.update(MarkerProblemSeverityAndMessageField.java:77)
at org.eclipse.ui.internal.views.markers.MarkerColumnLabelProvider.update(MarkerColumnLabelProvider.java:54)
at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:141)
at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:946)
at org.eclipse.ui.internal.views.markers.MarkersTreeViewer.doUpdateItem(MarkersTreeViewer.java:67)
at org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run(AbstractTreeViewer.java:117)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:44)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173)
at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:1025)
at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:475)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:44)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173)
at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2159)
at org.eclipse.jface.viewers.AbstractTreeViewer.createTreeItem(AbstractTreeViewer.java:840)
at org.eclipse.jface.viewers.AbstractTreeViewer.lambda$0(AbstractTreeViewer.java:817)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:792)
at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:595)
at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:763)
at org.eclipse.jface.viewers.AbstractTreeViewer.internalExpand(AbstractTreeViewer.java:1624)
at org.eclipse.jface.viewers.AbstractTreeViewer.setSelectionToWidget(AbstractTreeViewer.java:2490)
at org.eclipse.jface.viewers.StructuredViewer.setSelectionToWidget(StructuredViewer.java:1759)
at org.eclipse.jface.viewers.AbstractTreeViewer.setSelectionToWidget(AbstractTreeViewer.java:2962)
at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1715)
at org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer.java:1075)
at org.eclipse.ui.internal.views.markers.ExtendedMarkersView.setSelection(ExtendedMarkersView.java:1307)
at org.eclipse.ui.internal.views.markers.MarkerSupportInternalUtilities.showMarkers(MarkerSupportInternalUtilities.java:379)
at org.eclipse.ui.views.markers.MarkerViewUtil.showMarkers(MarkerViewUtil.java:125)
at org.eclipse.ui.views.markers.MarkerViewUtil.showMarker(MarkerViewUtil.java:91)
at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.updateMarkerViews(AbstractDecoratedTextEditor.java:2208)
at org.eclipse.xtext.ui.editor.XtextEditor.updateStatusLine(XtextEditor.java:658)
at org.eclipse.xtext.ui.editor.XtextEditor$3.selectionChanged(XtextEditor.java:536)
at org.eclipse.jface.text.TextViewer.firePostSelectionChanged(TextViewer.java:2628)
at org.eclipse.jface.text.TextViewer.firePostSelectionChanged(TextViewer.java:2576)
at org.eclipse.jface.text.TextViewer$5.run(TextViewer.java:2555)
at org.eclipse.swt.widgets.Display.runTimer(Display.java:4341)
at org.eclipse.swt.widgets.Display.messageProc(Display.java:3419)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2560)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3815)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
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:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
at org.eclipse.equinox.launcher.Main.main(Main.java:1472)
81985 [main] ERROR org.osate.xtext.aadl2.properties.ui.PropertiesExecutableExtensionFactory - Guice configuration errors:

@reteprelief
Copy link
Contributor Author

The same exceptions are getting logged when I run in stand-alone OSATE. This morning I produced 7 one MB log files in 6 minutes. The logs were found in .metadata of the workspace.

@reteprelief
Copy link
Contributor Author

There seems to be a relationship between the XText build getting interrupted and the Guice exception.
I watched both the Xtext console and the Eclipse development console.

[Worker-98] indexing platform:/resource/SecurityVerification/GlobalReqs/SecurityVerificationPlan.verify
[Worker-98] indexing platform:/resource/SecurityVerification/resolute/fromSMACCM/Execute_Completeness_Resolute.aadl
[Worker-98] interrupted
[Worker-98] interrupted
[Worker-98] Build interrupted.
[Worker-98] Build SecurityVerification in 1890 ms
[Worker-107] Building SecurityVerification
[Worker-107] indexing platform:/resource/SecurityVerification/resolute/Connectivity_Reachability.aadl
[Worker-107] indexing platform:/resource/SecurityVerification/resolute/Resolute_Util.aadl

@reteprelief
Copy link
Contributor Author

I can consistently reproduce it when editing in an annex. For example, you can open the GPS example from the Safety Tutorial in osate/examples and edit one of the error libraries.
It seems to get triggered when I edit a keyword, e.g., insert xxx into the middle of the keyword error.

@reteprelief
Copy link
Contributor Author

To be more precise:
I edited AFGErrorLibrary.
insert xxx into error of error behavior - save - no exception
insert xxx into types in end types above - save - no problem
remove xxx from types - save - no problem.
insert xxx into initial - save - problem.
remove xxx from initial - save - problem.
remove xxx from error - save - problem.

When removing I sometimes use z sometimes select the xxx and delete.

@reteprelief
Copy link
Contributor Author

I do not seem to get the issue when I work in a native language, i.e., models that are only AADL or any of the ALISA languages. May be related to annexes.

@lwrage
Copy link
Contributor

lwrage commented Aug 22, 2018

The IWorkbench binding is skipped because SharedStateModule is initialized before the workbench is running. This is triggered by the graphical editor. However, if the offending statement in the ge activator is removed nothing in OSATE works. The root cause may be the injector registration in OsateCorePlugin.

@brlarson
Copy link

brlarson commented Sep 5, 2018

Peter and Lutz,
I'm trying to bring up an experimental plugin for a unified AADL type system that incorporates unit relations so you can add miles-per-hour to meters-per-second multiply by a fortnight, and assign the result to rods, and insert the appropriate conversion factors.

I've run into exactly the same problem Peter found with IWorkbench and PropertiesExecutableExtensionFactory.

This has never happened with any of the BLESS plugins. I'm relieved to find Xtext experts far better than I encountered the same baffling problem.

I look forward to solution.

@brlarson
Copy link

brlarson commented Sep 6, 2018

Following Lutz's suggestion above, I tried to close the ge projects, but's there's a dependency in
org.osate.ui.wizards.NewAadlPackageWizard.
This seems to be a good use for dependency injection, not opening the Graphical Editor if nothing got injected. However, creating and using injectors can be spooky.

@lwrage lwrage added this to the 2.3.6 milestone Oct 4, 2018
@ghost ghost removed the in progress label Oct 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants