shdqcdsn / counterclockwise

Automatically exported from code.google.com/p/counterclockwise
0 stars 0 forks source link

Injection Exception trying to update lein dependencies #619

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Upgraded to 0.23.0.STABLE001 from 0.22.0.STABLE001
2. Changed a dependency in project.clj
3. Asked CCW to update dependencies (Leiningen -> Update dependencies) using
   right btn on the "Leiningen dependencies" in Project Explorer.

Change not reflected in the jar list under Leiningen dependencies.

.metadata/.log show the following stack traces:

!ENTRY org.eclipse.ui 4 0 2014-02-26 13:51:05.003
!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.e4.core.di.InjectionException: java.lang.IllegalArgumentException: 
No implementation of method: :resource of protocol: 
#'ccw.eclipse/IResourceCoercion found for class: 
org.eclipse.jdt.internal.ui.packageview.ClassPathContainer
    at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:63)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:243)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:224)
    at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
    at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:167)
    at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
    at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
    at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
    at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:850)
    at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:743)
    at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$7(HandledContributionItem.java:727)
    at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:662)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1392)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3742)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3363)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
    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:354)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
Caused by: java.lang.IllegalArgumentException: No implementation of method: 
:resource of protocol: #'ccw.eclipse/IResourceCoercion found for class: 
org.eclipse.jdt.internal.ui.packageview.ClassPathContainer
    at clojure.core$_cache_protocol_fn.invoke(core_deftype.clj:544)
    at ccw.eclipse$eval563$fn__564$G__554__569.invoke(eclipse.clj:80)
    at ccw.leiningen.handlers$event__GT_project.invoke(handlers.clj:44)
    at ccw.leiningen.handlers$event__GT_java_project.invoke(handlers.clj:51)
    at ccw.leiningen.handlers$update_dependencies.invoke(handlers.clj:64)
    at clojure.lang.Var.invoke(Var.java:383)
    at ccw.core.factories$handler_factory$fn__13.invoke(factories.clj:14)
    at ccw.core.factories.proxy$org.eclipse.core.commands.AbstractHandler$0.execute(Unknown Source)
    at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:290)
    at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
    ... 37 more

Any clue to work around this ? Will try to clean the workspace but reading the 
stack
trace I am not inclined to believe that it will solve the problem.

Thank you,
Luc

Original issue reported on code.google.com by lprefont...@softaddicts.ca on 26 Feb 2014 at 1:57

GoogleCodeExporter commented 9 years ago
Forgot to mention, running latest version of Kepler, all updates applied
under Ubuntu 12.04.4 LTS

Original comment by lprefont...@softaddicts.ca on 26 Feb 2014 at 2:02

GoogleCodeExporter commented 9 years ago
Running eclipse with -cleanup does not change anything

Original comment by lprefont...@softaddicts.ca on 26 Feb 2014 at 2:03

GoogleCodeExporter commented 9 years ago
Removing/adding Clojure support in project does not change anything either.

Original comment by lprefont...@softaddicts.ca on 26 Feb 2014 at 2:11

GoogleCodeExporter commented 9 years ago
Found a workaround. Ouf...

Calling the pop menu from the editor on the project.clj file works.
Any attempt to use the right button menu from the package or project 
explorer panes fails.

Is this a regression ? I used to call this from the package explorer or project
explorer panes.

Original comment by lprefont...@softaddicts.ca on 26 Feb 2014 at 2:41

GoogleCodeExporter commented 9 years ago
Looks like getting it to run once from the project.clj editor fixes the
behavior in the project explorer pane. I can now update dependencies wherever
it's called from.

Original comment by lprefont...@softaddicts.ca on 26 Feb 2014 at 2:45

GoogleCodeExporter commented 9 years ago
Weird, will try to reproduce the problem.

Original comment by laurent....@gmail.com on 6 Mar 2014 at 8:15

GoogleCodeExporter commented 9 years ago
Hello Luc,

Does the latest versions of CCW fix the problem?

Original comment by laurent....@gmail.com on 22 May 2014 at 7:07