0

I have a very old version of Eclipse (Juno Build id: 20130225-0426) and I recently installed Mars so I would have the latest version that used Java 7.

Now, when I use the Juno install, I cannot load methods for external classes. Only the methods for the class I am in work with the look up/auto-completion.

When I attempt to load the methods I am presented with this error dialog: enter image description here

And this in the workspace log:

!ENTRY org.eclipse.core.jobs 4 2 2018-05-17 11:04:06.864
!MESSAGE An internal error occurred during: "".
!STACK 0
java.lang.LinkageError: loader constraint violation: when resolving method "org.eclipse.recommenders.utils.rcp.JdtUtils.getLocation(Lorg/eclipse/jdt/core/IPackageFragmentRoot;)Lcom/google/common/base/Optional;" the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current class, org/eclipse/recommenders/internal/rcp/providers/ClasspathEntryInfoProvider, and the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) for resolved class, org/eclipse/recommenders/utils/rcp/JdtUtils, have different Class objects for the type ipse/jdt/core/IPackageFragmentRoot;)Lcom/google/common/base/Optional; used in the signature
    at org.eclipse.recommenders.internal.rcp.providers.ClasspathEntryInfoProvider.mapSourcePluginProjects(ClasspathEntryInfoProvider.java:220)
    at org.eclipse.recommenders.internal.rcp.providers.ClasspathEntryInfoProvider.onEvent(ClasspathEntryInfoProvider.java:172)
    at org.eclipse.recommenders.internal.rcp.providers.ClasspathEntryInfoProvider.scanOpenProjects(ClasspathEntryInfoProvider.java:132)
    at org.eclipse.recommenders.internal.rcp.providers.ClasspathEntryInfoProvider.access$1(ClasspathEntryInfoProvider.java:128)
    at org.eclipse.recommenders.internal.rcp.providers.ClasspathEntryInfoProvider$1.run(ClasspathEntryInfoProvider.java:105)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

!ENTRY org.eclipse.e4.ui.workbench 4 0 2018-05-17 11:04:07.488
!MESSAGE 
!STACK 0
org.eclipse.e4.core.di.InjectionException: java.lang.LinkageError: loader constraint violation: when resolving method "org.eclipse.recommenders.utils.rcp.JdtUtils.createUnresolvedType(Lorg/eclipse/jdt/internal/compiler/lookup/TypeBinding;)Lcom/google/common/base/Optional;" the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current class, org/eclipse/recommenders/internal/completion/rcp/BaseRecommendersCompletionContext, and the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) for resolved class, org/eclipse/recommenders/utils/rcp/JdtUtils, have different Class objects for the type (Lorg/eclipse/jdt/internal/compiler/lookup/TypeBinding;)Lcom/google/common/base/Optional; used in the signature
    at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:63)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:231)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:212)
    at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:131)
    at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:171)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:277)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:496)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:547)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:368)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.access$0(KeyBindingDispatcher.java:314)
    at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:83)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1262)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1052)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
    at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1104)
    at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1100)
    at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1521)
    at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4640)
    at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:345)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4528)
    at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4976)
    at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2546)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3756)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    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:353)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
    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:606)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
Caused by: java.lang.LinkageError: loader constraint violation: when resolving method "org.eclipse.recommenders.utils.rcp.JdtUtils.createUnresolvedType(Lorg/eclipse/jdt/internal/compiler/lookup/TypeBinding;)Lcom/google/common/base/Optional;" the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current class, org/eclipse/recommenders/internal/completion/rcp/BaseRecommendersCompletionContext, and the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) for resolved class, org/eclipse/recommenders/utils/rcp/JdtUtils, have different Class objects for the type (Lorg/eclipse/jdt/internal/compiler/lookup/TypeBinding;)Lcom/google/common/base/Optional; used in the signature
    at org.eclipse.recommenders.internal.completion.rcp.BaseRecommendersCompletionContext.getReceiverType(BaseRecommendersCompletionContext.java:319)
    at org.eclipse.recommenders.internal.completion.rcp.calls.engine.CallsCompletionProposalComputer.findReceiver(CallsCompletionProposalComputer.java:156)
    at org.eclipse.recommenders.internal.completion.rcp.calls.engine.CallsCompletionProposalComputer.computeCompletionProposals(CallsCompletionProposalComputer.java:121)
    at org.eclipse.jdt.internal.ui.text.java.CompletionProposalComputerDescriptor.computeCompletionProposals(CompletionProposalComputerDescriptor.java:333)
    at org.eclipse.jdt.internal.ui.text.java.CompletionProposalCategory.computeCompletionProposals(CompletionProposalCategory.java:340)
    at org.eclipse.jdt.internal.ui.text.java.ContentAssistProcessor.collectProposals(ContentAssistProcessor.java:328)
    at org.eclipse.jdt.internal.ui.text.java.ContentAssistProcessor.computeCompletionProposals(ContentAssistProcessor.java:284)
    at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:1839)
    at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals(CompletionProposalPopup.java:566)
    at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$16(CompletionProposalPopup.java:563)
    at org.eclipse.jface.text.contentassist.CompletionProposalPopup$2.run(CompletionProposalPopup.java:498)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopup.java:492)
    at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions(ContentAssistant.java:1665)
    at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer.doOperation(CompilationUnitEditor.java:183)
    at org.eclipse.ui.texteditor.ContentAssistAction$1.run(ContentAssistAction.java:82)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.ui.texteditor.ContentAssistAction.run(ContentAssistAction.java:80)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
    at org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:119)
    at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:76)
    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:606)
    at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
    ... 47 more

I would like to have both versions of Eclipse on my machine but if I need to revert to just having Juno installed that is fine as long as I can get rid of this error.

Moving up to a newer version is not an acceptable solution for me right now.

wmgeiger101x
  • 153
  • 3
  • 12
  • There is usually no problem with different Eclipse installations on the same machine as long as they use separate workspaces. If you open a workspace which is created with an older Eclipse version it may be possible that you are unable to open it with the old version anymore. Instead, you can checkout the same project with each Eclipse version in its individual workspace. – vanje May 17 '18 at 15:26
  • They are using separate workspaces – wmgeiger101x May 17 '18 at 15:28
  • If you never opened the old workspace with the new Eclipse then it is likely that the installation of your new Eclipse has nothing to do with your old Eclipse's problems. If nothing other helps you can create a new empty workspace and do a fresh checkout out of your source code version control system. – vanje May 17 '18 at 15:38
  • Creating a whole new workspace has not changed anything. I am still getting the errors. I found this thread about a linkage error (similar to the one in my log) https://stackoverflow.com/questions/244482/how-to-deal-with-linkageerrors-in-java and I am curious if the 2 eclipses managed to mess each other up. I also have both using their own JDK locations as well. – wmgeiger101x May 17 '18 at 15:55
  • To run Eclipse Oxygen Java 8 is required but Eclipse Oxygen can also be used to develop for older Java versions (Java 1.3 or higher). In _Window > Preferences: Java > Installed JREs_ you have to specify the JDK(s) that you want to use for developing (which can be different than the JRE/JDK used for running Eclipse). – howlger May 17 '18 at 19:37
  • I found out that I installed a new maven plugin in the Juno install and it seemed to mess the Guava reference up. So, Eclipse was doing exactly what it should have been doing and it was all cockpit error. After I restored an earlier install, it all seemed to work fine. – wmgeiger101x May 18 '18 at 12:57

0 Answers0