Menu

#12 Not working in Luna

v1.0.3
closed-fixed
None
5
2016-01-02
2014-07-03
No

No longer gets past installation on Eclipse Luna :(

An error occurred while installing the items
session context was:(profile=epp.package.jee, phase=org.eclipse.equinox.internal.p2.engine.phases.Install, operand=null --> [R]org.apache.velocity 1.7.0, action=).
Failed to prepare partial IU: [R]org.apache.velocity 1.7.0.

Discussion

  • Bob Fields

    Bob Fields - 2014-10-14

    After installing the plugin manually in Luna, when trying to use the plugin I get:
    org.eclipse.core.runtime.CoreException: Plug-in "org.vaulttec.velocity.ui" was unable to instantiate class "org.vaulttec.velocity.ui.editor.VelocityEditor".
    ....
    Caused by: java.lang.NullPointerException
    at org.vaulttec.velocity.ui.editor.text.VelocityCodeScanner.<init>(VelocityCodeScanner.java:44)
    at org.vaulttec.velocity.ui.editor.VelocityEditorEnvironment.connect(VelocityEditorEnvironment.java:37)
    at org.vaulttec.velocity.ui.editor.VelocityEditor.initializeEditor(VelocityEditor.java:81)
    at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.<init>(AbstractDecoratedTextEditor.java:343)
    at org.eclipse.ui.editors.text.TextEditor.<init>(TextEditor.java:59)
    at org.vaulttec.velocity.ui.editor.VelocityEditor.<init>(VelocityEditor.java:50)

    Also be aware that multiple versions of velocity play havoc with various other Eclipse plugins, especially m2e. After removing velocity 1.5.0.v200905192330 from the plugins directory and cleaning, I no longer got the velocity OSGI classloader problem:
    org.apache.velocity.exception.VelocityException: The specified class for ResourceManager (org.apache.velocity.runtime.resource.ResourceManagerImpl) does not implement org.apache.velocity.runtime.resource.ResourceManager; Velocity is not initialized correctly.
    at org.apache.velocity.runtime.RuntimeInstance.initializeResourceManager(RuntimeInstance.java:725)

    Velocity does not play well with OSGI, multiple versions are to be avoided, use v1.7.

     
  • Torsten Juergeleit

    Luna doesn't support Eclipse 2.0 style plugins anymore. These 2.0 plugins have to be converted to OSGi bundles or a compatibility layer plugin which adds support for 2.0 style Eclipse plugins has to be installed.

     
  • Torsten Juergeleit

    • status: open --> accepted
    • Group: v0.9.0 --> v1.0.3
     
  • Torsten Juergeleit

    • status: accepted --> closed-fixed
     
  • Torsten Juergeleit

    Fixed in version 1.0.4

     
  • Ray Vanderborght

    Thanks for the new version, but still having problem installing. Any tips?

    Cannot complete the install because of a conflicting dependency.
    Software currently installed: Eclipse IDE for Java EE Developers 4.4.0.20140612-0500 (epp.package.jee 4.4.0.20140612-0500)
    Software currently installed: Velocity UI 1.0.4 (org.vaulttec.velocity.feature.group 1.0.4)
    Only one of the following can be installed at once:
    Velocity 1.7.0.1 (org.apache.velocity 1.7.0.1)
    Apache Velocity Plug-in 1.5.0.v200905192330 (org.apache.velocity 1.5.0.v200905192330)
    Cannot satisfy dependency:
    From: Eclipse IDE for Java EE Developers 4.4.0.20140612-0500 (epp.package.jee 4.4.0.20140612-0500)
    To: org.eclipse.epp.package.jee.feature.feature.group [4.4.0.20140612-0500]
    Cannot satisfy dependency:
    From: EPP Java EE IDE Feature 4.4.0.20140612-0500 (org.eclipse.epp.package.jee.feature.feature.group 4.4.0.20140612-0500)
    To: org.eclipse.jpt.jpa.feature.feature.group 0.0.0
    Cannot satisfy dependency:
    From: Dali Java Persistence Tools - JPA Support 3.4.0.v201405081709-7V7dEpFC7sReAYthMgWBL39c7 (org.eclipse.jpt.jpa.feature.feature.group 3.4.0.v201405081709-7V7dEpFC7sReAYthMgWBL39c7)
    To: org.apache.velocity [1.5.0.v200905192330]
    Cannot satisfy dependency:
    From: Velocity UI 1.0.4 (org.vaulttec.velocity.feature.group 1.0.4)
    To: org.apache.velocity [1.7.0.1]

     
  • Torsten Juergeleit

    It seems that the JPA stuff from the Eclipse Java EE Developer distribution depends on an outdated version of Velocity. Eclipse maintains its third party dependencies in the Orbit project. Here you can find the outdated version of Velocity used in the Luna release http://download.eclipse.org/tools/orbit/downloads/drops/R20140525021250/

    How about starting with the plain Java Developer Eclipse distro, adding Veloedit and finally installing the JEE stuff. If there's no upper version limit on the Velocity dependency of the JPA stuff then the newer Velocity version of Veloedit will be used instead. Otherwise installing the JEE stuff will fail :-(

     
  • Torsten Juergeleit

    • status: closed-fixed --> pending
     
  • Torsten Juergeleit

    Accidentally I've enabled the singleton flag in the Velocity plugin. This keeps the OSGi runtime from loading both versions (JPAs 1.5 and Veloedits 1.7) in parallel.

    I've to check if disabling the singleton flag does the trick...

     
  • Ray Vanderborght

    Ah, that would explain it (hopefully). Thanks for digging into it.

    p.s. I got past the install by using a base eclipse and installing veloedit, then selecting the EE plugins I needed... but when opening a velocity template I then get this:

    org.eclipse.core.runtime.CoreException: Plug-in "org.vaulttec.velocity.ui" was unable to instantiate class "org.vaulttec.velocity.ui.editor.VelocityEditor".
    at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:194)
    at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:186)
    at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
    at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
    at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
    at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugin.java:294)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:289)
    at org.eclipse.ui.internal.registry.EditorDescriptor.createEditor(EditorDescriptor.java:235)
    at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:349)
    at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPart(CompatibilityPart.java:265)
    at org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPart(CompatibilityEditor.java:63)
    at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:303)
    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:483)
    at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
    at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:888)
    at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:869)
    at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:120)
    at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:337)
    at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:258)
    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:127)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:983)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:662)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:766)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:737)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:731)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:715)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl$1.handleEvent(PartServiceImpl.java:94)
    at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40)
    at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:187)
    at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:156)
    at org.eclipse.swt.widgets.Display.syncExec(Display.java:4721)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:218)
    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:81)
    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:488)
    at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:454)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:694)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.bringToTop(PartServiceImpl.java:387)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1134)
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3210)
    at org.eclipse.ui.internal.WorkbenchPage.access$23(WorkbenchPage.java:3125)
    at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:3107)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3102)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3066)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3056)
    at org.eclipse.ui.ide.IDE.openEditor(IDE.java:541)
    at org.eclipse.ui.ide.IDE.openEditor(IDE.java:500)
    at org.eclipse.ui.internal.ide.handlers.OpenResourceHandler.execute(OpenResourceHandler.java:129)
    at org.eclipse.ui.internal.ide.handlers.OpenResourceHandler.run(OpenResourceHandler.java:181)
    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(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:247)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:229)
    at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
    at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:149)
    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:210)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:286)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:507)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:558)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:378)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.access$0(KeyBindingDispatcher.java:324)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:86)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1087)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4184)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1467)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1490)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1475)
    at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1504)
    at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1500)
    at org.eclipse.swt.widgets.Tree.sendKeyEvent(Tree.java:2572)
    at org.eclipse.swt.widgets.Control.keyDown(Control.java:2396)
    at org.eclipse.swt.widgets.Composite.keyDown(Composite.java:607)
    at org.eclipse.swt.widgets.Tree.keyDown(Tree.java:1971)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:5629)
    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:2105)
    at org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:2329)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:5691)
    at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
    at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:5128)
    at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5277)
    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:3655)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
    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(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
    Caused by: java.lang.NullPointerException
    at org.vaulttec.velocity.ui.editor.text.VelocityCodeScanner.<init>(VelocityCodeScanner.java:44)
    at org.vaulttec.velocity.ui.editor.VelocityEditorEnvironment.connect(VelocityEditorEnvironment.java:37)
    at org.vaulttec.velocity.ui.editor.VelocityEditor.initializeEditor(VelocityEditor.java:81)
    at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.<init>(AbstractDecoratedTextEditor.java:343)
    at org.eclipse.ui.editors.text.TextEditor.<init>(TextEditor.java:59)
    at org.vaulttec.velocity.ui.editor.VelocityEditor.<init>(VelocityEditor.java:50)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
    at java.lang.Class.newInstance(Class.java:433)
    at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:184)
    ... 133 more

     
  • Torsten Juergeleit

    • status: pending --> closed-fixed
     
  • Torsten Juergeleit

    p.s. I got past the install by using a base eclipse and installing veloedit, then selecting the EE plugins I needed... but when opening a velocity template I then get this:

    This is fixed (hopefully :) in version 1.0.5 now.

     
  • Ray Vanderborght

    Sorry to report I still get that NPE when viewing a template =( On the plus side, it does install cleanly now on the EE version of Eclipse.

    p.s.
    I've mostly moved to IntelliJ, largely because it can at least syntax highlight velocity templates. Yours is the best velocity plugin for Eclipse, and frankly handles user directives better than IDEA does, but if it requires a ton of new work to get veloedit working in Luna I'll understand if you decide it's not worth the effort.

     
  • Torsten Juergeleit

    Sorry to report I still get that NPE when viewing a template =( On the plus side, it does install cleanly now on the EE version of Eclipse.

    You're right. As Bob already mentioned isn't it possible to run multiple versions of Velocity plugins in Eclipses OSGi runtime. After trying to create / open a Maven project via Eclipse m2e (which depends on Velocity 1.5.0) this fails badly.

    So this issue can't be fixed by providing Velocity as a separate plugin. Instead VeloEdit has to ship the Velocity library internally within the VeloEdit UI plugin.

     
  • Torsten Juergeleit

    • status: closed-fixed --> pending
     
  • R. Oldenburg

    R. Oldenburg - 2015-03-20

    Here a little patched version that is working with eclipse luna. It was a classloader issue. Setting currentThread.currentClassloader to getClass.getClassloader() was enough already.
    File must be copied into dir "eclipse_luna\plugins\org.vaulttec.velocity.ui_1.0.5"

     

    Last edit: R. Oldenburg 2015-03-20
  • Ray Vanderborght

    @roldenburg Thanks, that does fix it.

     
  • Stefan H.

    Stefan H. - 2015-11-19

    @tjuerge The patched version from roldenburg seems to work fine with eclipse Luna and Mars. Any chance a patched version using that workaround could be released via the official channels? Having to pull a 3rd party jar file from a bugreport isn't ideal. Thanks.

     
  • Patrik Turi

    Patrik Turi - 2015-11-26

    The fix works for me too with eclipse 4.4.2. Thank you.

     
  • Torsten Juergeleit

    • status: pending --> closed-fixed
     
  • Torsten Juergeleit

    Fixed in #1 of version 1.0.6 available from GitHub.

     

Log in to post a comment.