itemisCREATE / solidity-ide

Solidity plugin for Eclipse
Eclipse Public License 1.0
86 stars 25 forks source link

Failed to create injector #197

Closed vivekdbit closed 5 years ago

vivekdbit commented 6 years ago

Hi, i am getting this error, when i install it on eclipse oxgen.

Failed to create injector for com.yakindu.solidity.Solidity ExtensionFactory: com.yakindu.solidity.ui.SolidityExecutableExtensionFactory

Thanks, Vivek

flantony commented 6 years ago

Thank you very much for reporting this issue. I just tried an installation into a fresh oxygen, but was not able to reproduce the issue. Can you provide some further details, or steps to reproduce this? How did you install it (updatesite / eclipse marketplace/ download distribution)? Which Eclipse product are you using (Eclipse IDE for Java/Web/c/c++/... developers)? Did you notice any issues during the installation? When did the error occur(right after starting the IDE, or when opening a certain file)? Any further hint is appreciated. Thanks again!

vivekdbit commented 6 years ago

Hi Flantony, i am using Eclipse for PHP Developers. Version: Oxygen.3a Release 4.7.3a OS: Ubuntu 16.04 I tried this installation from eclipse marketplace. i did not noticed any issues while installation. i installed truffle framework from terminal and tried to import directory. after import i opened contracts -> Migrations.sol and then after this error message gets populate. Same, when i goto Windows -> Preferences -> Solidity and error message comes as "Unable to create the selected preferences page. Failed to create injector for com.yakindu.solidity.Solidity" Thanks for help.

esocode commented 6 years ago

I have the same problem after installing this plugin on a fresh Eclipse 2018-09 for Java installation without any other non-standard plugins on Windows 10. The Installation went through but opening or creating solidity files or invoking any preferences page causes errors. The only thing that is working is invoking the compiler preferences page. The stacktrace:

eclipse.buildId=4.9.0.I20180906-0745 java.version=1.8.0_191 java.vendor=Oracle Corporation BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE Framework arguments: -product org.eclipse.epp.package.java.product -product org.eclipse.epp.package.java.product Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product -product org.eclipse.epp.package.java.product

com.yakindu.solidity.ui Error Sun Nov 04 13:52:03 CET 2018 Unable to create the selected preference page.

java.lang.RuntimeException: Failed to create injector for com.yakindu.solidity.Solidity at com.yakindu.solidity.ui.internal.SolidityActivator.createInjector(SolidityActivator.java:71) at com.yakindu.solidity.ui.internal.SolidityActivator.getInjector(SolidityActivator.java:55) at com.yakindu.solidity.ui.SolidityExecutableExtensionFactory.getInjector(SolidityExecutableExtensionFactory.java:24) at org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory.create(AbstractGuiceAwareExecutableExtensionFactory.java:53) at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:265) at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:63) at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:284) at org.eclipse.ui.internal.dialogs.WorkbenchPreferenceNode.createPage(WorkbenchPreferenceNode.java:51) at org.eclipse.jface.preference.PreferenceDialog.createPage(PreferenceDialog.java:1279) at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.createPage(FilteredPreferenceDialog.java:361) at org.eclipse.jface.preference.PreferenceDialog.showPage(PreferenceDialog.java:1166) at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.showPage(FilteredPreferenceDialog.java:675) at org.eclipse.jface.preference.PreferenceDialog$5.lambda$0(PreferenceDialog.java:660) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:72) at org.eclipse.jface.preference.PreferenceDialog$5.selectionChanged(PreferenceDialog.java:657) at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:874) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:47) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:176) at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:871) at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1720) at org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer.java:1084) at org.eclipse.jface.preference.PreferenceDialog.selectSavedItem(PreferenceDialog.java:990) at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.selectSavedItem(FilteredPreferenceDialog.java:727) at org.eclipse.jface.preference.PreferenceDialog.lambda$0(PreferenceDialog.java:350) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:72) at org.eclipse.jface.preference.PreferenceDialog.createContents(PreferenceDialog.java:347) at org.eclipse.jface.window.Window.create(Window.java:429) at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1099) at org.eclipse.ui.internal.dialogs.WorkbenchPreferenceDialog.createDialogOn(WorkbenchPreferenceDialog.java:105) at org.eclipse.ui.dialogs.PreferencesUtil.createPreferenceDialogOn(PreferencesUtil.java:195) at org.eclipse.ui.dialogs.PreferencesUtil.createPreferenceDialogOn(PreferencesUtil.java:119) at org.eclipse.ui.internal.OpenPreferencesAction.run(OpenPreferencesAction.java:65) at org.eclipse.jface.action.Action.runWithEvent(Action.java:476) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:568) at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:400) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4145) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1055) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3958) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3561) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156) at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:628) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:563) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:151) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:155) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:199) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:391) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:246) 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:659) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:595) at org.eclipse.equinox.launcher.Main.run(Main.java:1501) Caused by: com.google.inject.CreationException: Guice creation errors:

1) Error injecting constructor, java.lang.ArrayStoreException at com.yakindu.solidity.typesystem.BuildInDeclarations.(Unknown Source) while locating com.yakindu.solidity.typesystem.BuildInDeclarations for field at com.yakindu.solidity.scoping.SolidityGlobalScopeProvider.buildIn(Unknown Source) while locating com.yakindu.solidity.scoping.SolidityGlobalScopeProvider while locating org.eclipse.xtext.scoping.IGlobalScopeProvider for field at org.eclipse.xtext.ui.editor.templates.CrossReferenceTemplateVariableResolver.globalScopeProvider(Unknown Source) at org.eclipse.xtext.ui.editor.templates.CrossReferenceTemplateVariableResolver.class(Unknown Source) while locating org.eclipse.xtext.ui.editor.templates.CrossReferenceTemplateVariableResolver for parameter 0 at org.eclipse.xtext.ui.editor.templates.XtextTemplateContextType.setCrossReferenceResolver(Unknown Source) while locating org.eclipse.xtext.ui.editor.templates.XtextTemplateContextType at org.eclipse.xtext.ui.editor.templates.XtextTemplateContextTypeRegistry.(Unknown Source) at org.eclipse.xtext.ui.editor.templates.XtextTemplateContextTypeRegistry.class(Unknown Source) while locating org.eclipse.xtext.ui.editor.templates.XtextTemplateContextTypeRegistry while locating org.eclipse.jface.text.templates.ContextTypeRegistry for field at org.eclipse.xtext.ui.codetemplates.ui.registry.LanguageRegistrar.contextTypeRegistry(Unknown Source) at org.eclipse.xtext.service.MethodBasedModule.configure(MethodBasedModule.java:57) while locating org.eclipse.xtext.ui.codetemplates.ui.registry.LanguageRegistrar

1 error at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:435) at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:183) 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.yakindu.solidity.ui.internal.SolidityActivator.createInjector(SolidityActivator.java:67) ... 61 more Caused by: java.lang.ArrayStoreException

flantony commented 5 years ago

Thank you @esocode & @vivekdbit for providing a stack trace. I am able to reproduce this issue and will have a closer look as soon as possible.

erikvaningen commented 5 years ago

I have this eclipse: Eclipse IDE for Java Developers Version: 2018-09 (4.9.0) Build id: 20180917-1800 and I installed the plugin through the marketplace.

andreasmuelder commented 5 years ago

Xtext is missing I will add it to dependent features