Hi, are you sure IPersistentVector is in your classpath? From the stacktrace it looks as if it cannot find it.
Best regards, Lars 2013/11/21 Laurent PETIT <[email protected]> > Pragmatic question : I'm unable to have the Annotations / Dependency > Injection mechanism work with my Clojure-defined type. > > I was able to dynamically create the MCommand, attach it to the > Application, activate my handler instance via the EHandlerService), > but when I invoke the generated handler via > handlerService.executeHandler(parameterizedCommand), I get the > exception below. > > I'm currently unable to understand what's happening. There's the > dependency injection mechanism calling getDeclaredMethods() ... and > things go down to trying to reload the class ... something like that ? > > ENTRY org.eclipse.ui 4 0 2013-11-21 23:38:59.807 > > !MESSAGE Unhandled event loop exception > > !STACK 0 > > java.lang.NoClassDefFoundError: clojure/lang/IPersistentVector > > at java.lang.Class.getDeclaredMethods0(Native Method) > > at java.lang.Class.privateGetDeclaredMethods(Class.java:2451) > > at java.lang.Class.getDeclaredMethods(Class.java:1810) > > at > org.eclipse.e4.core.internal.di.InjectorImpl.getDeclaredMethods(InjectorImpl.java:739) > > at > org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:228) > > 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.setEnabled(HandlerServiceHandler.java:82) > > at org.eclipse.core.commands.Command.setEnabled(Command.java:886) > > at org.eclipse.core.commands.Command.executeWithChecks(Command.java:488) > > 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.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:285) > > at > org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:504) > > at > org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:555) > > at > org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:376) > > at > org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.access$0(KeyBindingDispatcher.java:322) > > at > org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:84) > > at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) > > at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1080) > > at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4165) > > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1466) > > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1489) > > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1474) > > at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1503) > > at org.eclipse.swt.widgets.Control.insertText(Control.java:2084) > > at org.eclipse.swt.widgets.Canvas.insertText(Canvas.java:277) > > at org.eclipse.swt.widgets.Display.windowProc(Display.java:5646) > > at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method) > > at > org.eclipse.swt.internal.cocoa.NSResponder.interpretKeyEvents(NSResponder.java:68) > > at org.eclipse.swt.widgets.Composite.keyDown(Composite.java:594) > > at org.eclipse.swt.widgets.Display.windowProc(Display.java:5558) > > at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method) > > at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:221) > > at org.eclipse.swt.widgets.Widget.windowSendEvent(Widget.java:2104) > > at org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:2318) > > at org.eclipse.swt.widgets.Display.windowProc(Display.java:5620) > > at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method) > > at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:5057) > > at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5206) > > at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method) > > at > org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:128) > > at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3648) > > 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:57) > > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > > at java.lang.reflect.Method.invoke(Method.java:601) > > 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.ClassNotFoundException: clojure.lang.IPersistentVector > > at java.net.URLClassLoader$1.run(URLClassLoader.java:366) > > at java.net.URLClassLoader$1.run(URLClassLoader.java:355) > > at java.security.AccessController.doPrivileged(Native Method) > > at java.net.URLClassLoader.findClass(URLClassLoader.java:354) > > at clojure.lang.DynamicClassLoader.findClass(DynamicClassLoader.java:61) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:423) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:356) > > ... 65 more > > 2013/11/21 Laurent PETIT <[email protected]>: > > 2013/11/21 Tom Schindl <[email protected]>: > >> On 21.11.13 16:00, Laurent PETIT wrote: > >>> Hello, > >>> > >>> I'm Laurent Petit, main developer of Counterclockwise, the open source > >>> Clojure Plugin for Eclipse. > >>> > >>> Lars Vogel suggested me to post my questions here, since they are > >>> related to uncommon use of the Eclipse 4 framework. > >>> > >>> I want to embrace Eclipse 4 Model and dynamic (runtime) development in > >>> the Counterclockwise plugin. > >>> > >>> So I'm currently experimenting with an interactive Clojure Console to > >>> modify the Model on the fly. > >>> I've been successful in getting parts from the IEclipseContext, and > from > >>> them creating parts via MBasicFactory, etc. > >>> > >>> My current problem is the apparent requirement for implementing > Handlers > >>> to : > >>> - have the classes pre-compiled (as opposed to being dynamically > created > >>> via in-memory bytecode generation as Clojure does). I'm thinking this > >>> because of the required "class URI". > >>> - use @Execute annotation instead of implementing an interface. > >>> > >> > >> It looks like we forgot to add something like IContributionFactory for > >> method calling! > >> > >> Still I'm not sure this is a problem to you because if I got it right > >> you create a jvm-object instance (although dynamically) through > >> IContributionFactory (you can push your own into the root context!). So > >> can't you simply create an annotated method through Clojure? > > > > I think I could create an annoted class through Clojure. > > But still, it wouldn't be "ready to be read" from the bundle > > jar/directory on the filesystem. > > So I would still have to find a way to dynamically hook into the > > mechanism so that I can load a class instance ... > > > >> Looking at the default implementation (ReflectionContributionFactory) > >> there was at one time an extension point to contribute new protcols > >> (e.g. bundleclojure://mybundle/MyClojure.clojure) support but I doubt it > >> is still available/working. > > > > ... so I really hope that this extension you're talking about is working. > > Since my plugin will work within the regular Eclipse IDE, I'm not sure > > I should push my own IContributionFactory replacing / superseding the > > Eclipse's ReflectionContributionFactory. > > > > I saw the extension point you're talking about. It's > > IContributionFactorySpi, right ? Provided via the > > org.eclipse.e4.languages extension point. > > > > Why do you say you doubt it's still available/working? > > > > > > > >> > >> Tom > >> _______________________________________________ > >> e4-dev mailing list > >> [email protected] > >> https://dev.eclipse.org/mailman/listinfo/e4-dev > _______________________________________________ > e4-dev mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/e4-dev >
_______________________________________________ e4-dev mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/e4-dev
