Eclipse Refactoring (Renaming) throws ExecutionException caused by NullpoinerException - eclipse

While coding yesterday I stumbled over a sudden error occuring in my Eclipse IDE. I wanted to rename a variable and pressed (as I should and I am used to) ALT + SHIFT + R. This however opened Run in the toolbar. I thought ok maybe I pressed wrong keys but this error kept happening.
I then tried to restart Eclipse, reload the project (deleted it but not the content on the disk and loaded it again by importing) and also deleted the workspace but the error still occured.
Then I thought maybe the installation is somehow broken so I reinstalled Eclipse (btw. I am using the latest 06-2020 Version). This did not help either though...
After a lot of using Google I also found the following articles this question might seem to be similar to
Can't refactor rename in Eclipse
Eclipse refactoring fails -> Keeps throwing exceptions!
https://www.eclipse.org/forums/index.php/t/375178/
but the suggestions in these did not work for me.
What I saw while browsing the Error-log was that a lot of errors occured while using the rename function. I hope someone has a suggestion how to fix this because also renaming with mouse doesn't work any more.
Some more details:
Error suddenly occured > It worked all the time and suddenly stopped working without (at least me) knowing about any changes
I am using Windows 10 with OpenJ9 JDK14 as the default JDK an JRE so eclipse also uses this JRE
Errors:
!ENTRY org.eclipse.e4.ui.workbench 4 0 2020-08-22 09:57:49.697
!MESSAGE Execution exception for: ParameterizedCommand(Command(org.eclipse.jdt.ui.edit.text.java.rename.element,Rename - Refactoring ,
Rename the selected element,
Category(org.eclipse.jdt.ui.category.refactoring,Refactor - Java,Java Refactoring Actions,true),
org.eclipse.ui.internal.WorkbenchHandlerServiceHandler#bcbec4c7,
,,true),null) in
context chain: WorkbenchContext -> TrimmedWindowImpl (IDEWindow) Context -> PerspectiveImpl (org.eclipse.jdt.ui.JavaPerspective) Context -> PartImpl (org.eclipse.e4.ui.compatibility.editor) removeOnHide org.eclipse.jdt.ui.CompilationUnitEditorContext
!STACK 0
org.eclipse.core.commands.ExecutionException: While executing the action, an exception occurred
at org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:126)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:97)
at jdk.internal.reflect.GeneratedMethodAccessor46.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:319)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:253)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:173)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:156)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:488)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:487)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:308)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:584)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:653)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:443)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.access$2(KeyBindingDispatcher.java:386)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:96)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1248)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1036)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1046)
at org.eclipse.swt.widgets.Control.traverse(Control.java:4257)
at org.eclipse.swt.widgets.Control.translateMnemonic(Control.java:4107)
at org.eclipse.swt.widgets.Composite.translateMnemonic(Composite.java:1240)
at org.eclipse.swt.widgets.Composite.translateMnemonic(Composite.java:1243)
at org.eclipse.swt.widgets.Control.translateMnemonic(Control.java:4125)
at org.eclipse.swt.widgets.Display.translateMnemonic(Display.java:4824)
at org.eclipse.swt.widgets.Display.filterMessage(Display.java:1266)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3626)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1158)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1047)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:658)
at org.eclipse.ui.internal.Workbench$$Lambda$201/0000000000000000.run(Unknown Source)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:154)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
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:401)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
at org.eclipse.equinox.launcher.Main.run(Main.java:1447)
Caused by: java.lang.NullPointerException
at org.eclipse.jdt.internal.corext.dom.LinkedNodeFinder.getAssociatedRecordComponentNode(LinkedNodeFinder.java:68)
at org.eclipse.jdt.internal.corext.dom.LinkedNodeFinder$BindingFinder.visit(LinkedNodeFinder.java:334)
at org.eclipse.jdt.core.dom.SimpleName.accept0(SimpleName.java:198)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2971)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:3019)
at org.eclipse.jdt.core.dom.QualifiedName.accept0(QualifiedName.java:163)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2971)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:3019)
at org.eclipse.jdt.core.dom.InfixExpression.accept0(InfixExpression.java:356)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2971)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:3019)
at org.eclipse.jdt.core.dom.IfStatement.accept0(IfStatement.java:181)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2971)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:3042)
at org.eclipse.jdt.core.dom.Block.accept0(Block.java:128)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2971)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:3019)
at org.eclipse.jdt.core.dom.MethodDeclaration.accept0(MethodDeclaration.java:698)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2971)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:3042)
at org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:447)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2971)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:3042)
at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:258)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2971)
at org.eclipse.jdt.internal.corext.dom.LinkedNodeFinder.findByBinding(LinkedNodeFinder.java:145)
at org.eclipse.jdt.internal.corext.dom.LinkedNodeFinder.findByNode(LinkedNodeFinder.java:165)
at org.eclipse.jdt.internal.ui.refactoring.reorg.RenameLinkedMode.start(RenameLinkedMode.java:234)
at org.eclipse.jdt.internal.ui.refactoring.actions.RenameJavaElementAction.run(RenameJavaElementAction.java:240)
at org.eclipse.jdt.internal.ui.refactoring.actions.RenameJavaElementAction.doRun(RenameJavaElementAction.java:174)
at org.eclipse.jdt.internal.ui.refactoring.actions.RenameJavaElementAction.run(RenameJavaElementAction.java:153)
at org.eclipse.jdt.ui.actions.RenameAction.run(RenameAction.java:121)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:278)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:252)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)
at org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:121)
... 53 more

This looks like Eclipse bug 564329 which is marked as fixed in Eclipse core 4.17 M1 (Milestone 1). So this fix will be in the 2020-09 release scheduled for September 2020.

Temporary fix: Window > Preferences > Java Compiler > turn off "Enable preview features for Java 14". Enable the "Use default compliance settings".
Enable preview features setting

Related

Eclipse Missing javax.xml.bind With Java 11 at Launch of Eclipse

Maybe I should write as the first line: this isn't about writing code and needing JAXB as some form of dependency
I keep having problems when launching Eclipse 2021-03 and 2021-06 with Java 11 as it's missing the JAXB support. Several solutions I could find about this matter actually talk about how to make it work as part of a Java/Maven-project. However, I'm talking about Eclipse here, launching it, not writing code.
Side note: It also occurs while building a project of ours that requires JAXB, which works fine when built with Maven inside Eclipse. So it's an Eclipse-only problem.
This can be reproduced with MoreUnit installed and navigating in the Preferences to MoreUnit > Java > Mock Generation, which leads to this:
java.lang.ClassNotFoundException: An error occurred while automatically activating bundle org.moreunit.mock (932).
at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:126)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:572)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:345)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:401)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:480)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:170)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:519)
at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:622)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:196)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:920)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:246)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:63)
at org.eclipse.ui.internal.WorkbenchPlugin.lambda$0(WorkbenchPlugin.java:287)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:74)
at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:285)
at org.eclipse.ui.internal.dialogs.WorkbenchPreferenceNode.createPage(WorkbenchPreferenceNode.java:52)
at org.eclipse.jface.preference.PreferenceDialog.createPage(PreferenceDialog.java:1280)
at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.createPage(FilteredPreferenceDialog.java:338)
at org.eclipse.jface.preference.PreferenceDialog.showPage(PreferenceDialog.java:1166)
at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.showPage(FilteredPreferenceDialog.java:630)
at org.eclipse.jface.preference.PreferenceDialog$5.lambda$0(PreferenceDialog.java:660)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:74)
at org.eclipse.jface.preference.PreferenceDialog$5.selectionChanged(PreferenceDialog.java:657)
at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:823)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:820)
at org.eclipse.jface.viewers.StructuredViewer.handlePostSelect(StructuredViewer.java:1193)
at org.eclipse.swt.events.SelectionListener$1.widgetSelected(SelectionListener.java:84)
at org.eclipse.jface.util.OpenStrategy.firePostSelectionEvent(OpenStrategy.java:263)
at org.eclipse.jface.util.OpenStrategy.access$5(OpenStrategy.java:258)
at org.eclipse.jface.util.OpenStrategy$1.lambda$1(OpenStrategy.java:428)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:5096)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4602)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
at org.eclipse.jface.window.Window.open(Window.java:799)
at org.eclipse.ui.internal.OpenPreferencesAction.run(OpenPreferencesAction.java:66)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:580)
at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:414)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5879)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1427)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:5121)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4599)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1157)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
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:401)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:654)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1462)
at org.eclipse.equinox.launcher.Main.main(Main.java:1435)
Caused by: org.osgi.framework.BundleException: Exception in org.moreunit.mock.MoreUnitMockPlugin.start() of bundle org.moreunit.mock.
at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:835)
at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:763)
at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1028)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:371)
at org.eclipse.osgi.container.Module.doStart(Module.java:605)
at org.eclipse.osgi.container.Module.start(Module.java:468)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:511)
at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:117)
... 68 more
Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
at org.moreunit.mock.config.MockModule.getXmlTemplateDefinitionReader(MockModule.java:168)
at org.moreunit.mock.config.MockModule.prepare(MockModule.java:81)
at org.moreunit.core.config.Module.start(Module.java:72)
at org.moreunit.mock.MoreUnitMockPlugin.start(MoreUnitMockPlugin.java:24)
at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:814)
at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:1)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:554)
at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:806)
... 75 more
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException cannot be found by org.moreunit.mock_3.2.1
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:519)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:170)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:519)
... 83 more
So pretty much the only information I could find is this comment from 2019 about an older Eclipse-version that could still run with an older Java-version. However, for two versions or so Eclipse has to run with Java 11 minimum. And that's where the troubles start.
Note that I'm a total noob in the JAXB-, OSGI- and bundling area and maybe I didn't understand that a certain answer on the internet may have fixed it for me. What I've tried:
adding -Dorg.osgi.framework.bundle.parent=ext to eclipse.ini doesn't fix it
adding -Dorg.osgi.framework.bundle.parent=app to eclipse.ini doesn't fix it
adding --add-modules java.xml.bind to eclipse.ini doesn't fix it, launching it results in an exit code 1:
[sjngm#sjngm eclipse]$ eclipse -consoleLog
Error occurred during initialization of boot layer
java.lang.module.FindException: Module java.xml.bind not found
Gtk-Message: 22:28:53.909: GtkDialog mapped without a transient parent. This is discouraged.
[sjngm#sjngm eclipse]$ echo $?
1
[sjngm#sjngm eclipse]$
Anything else I can try?

Not being able to launch exported 64bit product when exporting to multiple platforms

I have followed the current steps to export my product for multiple platforms (namely, following the steps in the preferred way of doing multi-platform builds). However, when I export the product to multiple platforms (for the moment win32.x86 & win32.x86_64) only the x86 version starts correctly. The 64bit version throws the following error:
!MESSAGE An error occurred while automatically activating bundle org.eclipse.ui.workbench (97).
!STACK 0
org.osgi.framework.BundleException: Error starting module.
at org.eclipse.osgi.container.Module.doStart(Module.java:590)
at org.eclipse.osgi.container.Module.start(Module.java:449)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:468)
at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:114)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:505)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:328)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:392)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:470)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:419)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:411)
at org.eclipse.osgi.internal.framework.BundleContextImpl.loadBundleActivator(BundleContextImpl.java:762)
at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:716)
at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1002)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:354)
at org.eclipse.osgi.container.Module.doStart(Module.java:581)
at org.eclipse.osgi.container.Module.start(Module.java:449)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:468)
at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:114)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:505)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:328)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:392)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:470)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:419)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:411)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:609)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:177)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:931)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:60)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:191)
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:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
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:656)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:592)
at org.eclipse.equinox.launcher.Main.run(Main.java:1498)
Caused by: java.lang.NoClassDefFoundError: org/eclipse/swt/SWTError
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.eclipse.osgi.internal.framework.BundleContextImpl.loadBundleActivator(BundleContextImpl.java:763)
at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:716)
at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1002)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:354)
at org.eclipse.osgi.container.Module.doStart(Module.java:581)
... 42 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.SWTError cannot be found by org.eclipse.ui.workbench_3.111.0.v20180524-1156
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:508)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:419)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:411)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 51 more
I assume that it is caused by the x86_64 swt plugin not being loaded, however while org.eclipse.swt.win32.win32.x86 plugin is included in the contents of the product definition, when trying to add the x86_64 plugin into the contents of my product, it doesn't appear on the plugin selection dialog (and of course is not already in the list of plugins).
The only thing remotely related to a x86_64 plugin available is the org.eclipse.equinox.launcher.win32.win32.x86_64, but including this and exporting again (unsurprisingly) returns the same error.
I've checked that the target platform has been updated with the software site from 4.8 files, only a few warnings appear.
How can I force the org.eclipse.swt.win32.win32.x86_64 plugin to appear in the available plugins to be selected in my product? I there any additional step to allow multiple platform export?
when you input "Work With",you can not only "replace 4.8 with your version".you must browse this url,(my version is 4.13)
https://download.eclipse.org/eclipse/downloads/drops4/S-4.13M1-201907111805/
and find "Eclipse p2 Repository",now you find true url to "Work With"
it is very importen that You must find the release notes for it.
like this
https://download.eclipse.org/eclipse/downloads/
Finally made it to work. My target platform was corrupted somehow. Creating a new target platform and following the wiki steps worked this time.
The steps are:
Open Window/Preferences.
Find PDE/Target Platform
Select your (active) target platform
Click Edit
Click Add
Select "Software Site"
Click Next
In "Work With" type: http://download.eclipse.org/eclipse/updates/4.8 (replace 4.8 with your version)
Check "Eclipse RCP Target Components"
Check "Equinox Target Components"
Uncheck "Include required software"
Check "Include all environments"
Press Finish
Press Finish
Press OK

Eclipse Jee Oxygen error when debugging Eclipse Applications

This is about Eclipse Jee Oxygen (eclipse.buildId = 4.7.3.M20180301-0715).
Until this morning everything was running fine, then Eclipse update poped-up.
I decided to take the update and after restarting Eclipse I tried to debug a plugin project I'm working on. When I clicked Debug as > Eclipse Application menu, the other Eclipse instance started to be loaded, but it was interrupted with the following error stack:
java.lang.NullPointerException
at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.<init>(ModelServiceImpl.java:122)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createDefaultContext(E4Application.java:511)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:204)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:614)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
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:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
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:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
at org.eclipse.equinox.launcher.Main.main(Main.java:1472)
I tryed to revert the update but now nothing works anymore. This is real only for debugging an Eclipse Application, other features of Eclipse seem to be ok.
Any ideas?
Go to your Target Platform preference page and make sure its settings are still valid by resetting to the defaults if needed.
After many unsuccessful attempts to fix the problem, I decided to create a new workspace and check out my project from Subversion, then I updated some files that were not yet committed and everything got back to work again.
I don't consider this a really good solution since what I did was to dodge the issue, but at least it shows that the problem is not in Eclipse itself, but in some workspace condition.

Javadoc Hover suddenly broke in eclipse luna

I installed eclipse luna a week ago and worked every day with it until the javadoc broke yesterday.
When i hover on a class or method, the popup shows, with the right dimension apparently, but it's blank.
This problem happens for classes that i wrote, classes that come from maven dependencies and classes from the jdk (like String).
I restarted eclipse, the computer, and it still doesn't work.
I didn't notice anything i did diferently that could have caused this.
I looked at the build path and for each jar, there is the source path and the javadoc path.
The javadoc view is empty also.
I don't know what to do. I can't work without the javadoc hovers.
Edit :
In the error view i saw that the first time i try to hover i get an Internal error on "org.eclipse.jdt.ui" :
java.net.MalformedURLException: unknown protocol: res
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at org.eclipse.jdt.internal.ui.viewsupport.JavaElementLinks$1.changing(JavaElementLinks.java:300)
at org.eclipse.swt.browser.IE$7.handleEvent(IE.java:510)
at org.eclipse.swt.ole.win32.OleEventTable.sendEvent(OleEventTable.java:55)
at org.eclipse.swt.ole.win32.OleEventSink.notifyListener(OleEventSink.java:152)
at org.eclipse.swt.ole.win32.OleEventSink.Invoke(OleEventSink.java:120)
at org.eclipse.swt.ole.win32.OleEventSink.access$1(OleEventSink.java:97)
at org.eclipse.swt.ole.win32.OleEventSink$1.method6(OleEventSink.java:71)
at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:119)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2549)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
at org.eclipse.jface.internal.text.html.BrowserInformationControl.setVisible(BrowserInformationControl.java:351)
at org.eclipse.jface.text.AbstractInformationControlManager.showInformationControl(AbstractInformationControlManager.java:1270)
at org.eclipse.jface.text.TextViewerHoverManager.showInformationControl(TextViewerHoverManager.java:283)
at org.eclipse.jface.text.AbstractInformationControlManager.internalShowInformationControl(AbstractInformationControlManager.java:1221)
at org.eclipse.jface.text.AbstractInformationControlManager.presentInformation(AbstractInformationControlManager.java:1150)
at org.eclipse.jface.text.AbstractHoverInformationControlManager.presentInformation(AbstractHoverInformationControlManager.java:902)
at org.eclipse.jface.text.TextViewerHoverManager.doPresentInformation(TextViewerHoverManager.java:243)
at org.eclipse.jface.text.TextViewerHoverManager$5.run(TextViewerHoverManager.java:233)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4147)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3764)
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:382)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:236)
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:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Edit 2 : it still doesn't work !
I uninstalled eclipse and reinstalled a fresh one, i wiped the workspace, there are no changes.
The problem is as the #Pavel Horal said
You should switch your browser to a different one , the default browser is IE by modifying the eclipse.ini file eclipse.org/swt/faq.php#browserspecifydefault
or just add
-Dorg.eclipse.swt.browser.DefaultType=mozilla
at the end of your eclipse.ini file.
Or if you are more comfortable with UI interface of the eclipse you can use this help to change the default browser HELP.

Eclipse properties panel error

Each time i launch the properties panel i get this error:
Could not accept change: the currently
displayed page contains invalid
values.
I have tried to use a fresh new workspace & a new install of eclipse without any result.
I am on mac OS X.
Any help wellcome
screen captures of the problem:
alt text http://www.neverblind.eu/eclipse_error/1.jpg
alt text http://www.neverblind.eu/eclipse_error/2.jpg
alt text http://www.neverblind.eu/eclipse_error/3.jpg
Here 2 new screen capture (fresh new loaded eclipse + new workspace)
alt text http://www.neverblind.eu/eclipse_error/4.jpg
alt text http://www.neverblind.eu/eclipse_error/5.jpg
I found the error on the eclipse workspace .log file :
!ENTRY org.eclipse.jface 4 2 2010-05-21 18:24:06.148
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
!STACK 0
java.lang.NoClassDefFoundError
at com.ibm.icu.util.TimeZone.getDefault(TimeZone.java:804)
at com.ibm.icu.util.Calendar.getInstanceInternal(Calendar.java:1630)
at com.ibm.icu.util.Calendar.getInstance(Calendar.java:1594)
at com.ibm.icu.text.DateFormat.get(DateFormat.java:1288)
at com.ibm.icu.text.DateFormat.getDateTimeInstance(DateFormat.java:1078)
at org.eclipse.ui.internal.ide.dialogs.IDEResourceInfoUtils.getDateStringValue(IDEResourceInfoUtils.java:132)
at org.eclipse.ui.internal.ide.dialogs.ResourceInfoPage.createStateGroup(ResourceInfoPage.java:426)
at org.eclipse.ui.internal.ide.dialogs.ResourceInfoPage.createContents(ResourceInfoPage.java:254)
at org.eclipse.jface.preference.PreferencePage.createControl(PreferencePage.java:232)
at org.eclipse.jface.preference.PreferenceDialog.createPageControl(PreferenceDialog.java:1501)
at org.eclipse.jface.preference.PreferenceDialog$14.run(PreferenceDialog.java:1258)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.runtime.Platform.run(Platform.java:888)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at org.eclipse.jface.preference.PreferenceDialog.showPage(PreferenceDialog.java:1252)
at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.showPage(FilteredPreferenceDialog.java:679)
at org.eclipse.jface.preference.PreferenceDialog$10.run(PreferenceDialog.java:708)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.preference.PreferenceDialog$9.selectionChanged(PreferenceDialog.java:704)
at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:864)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.runtime.Platform.run(Platform.java:888)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:862)
at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1670)
at org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer.java:1124)
at org.eclipse.jface.preference.PreferenceDialog.selectSavedItem(PreferenceDialog.java:1054)
at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.selectSavedItem(FilteredPreferenceDialog.java:734)
at org.eclipse.jface.preference.PreferenceDialog$4.run(PreferenceDialog.java:375)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.preference.PreferenceDialog.createContents(PreferenceDialog.java:371)
at org.eclipse.jface.window.Window.create(Window.java:431)
at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
at org.eclipse.ui.internal.dialogs.PropertyDialog.createDialogOn(PropertyDialog.java:82)
at org.eclipse.ui.dialogs.PropertyDialogAction.createDialog(PropertyDialogAction.java:176)
at org.eclipse.ui.dialogs.PropertyDialogAction.run(PropertyDialogAction.java:155)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3543)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1250)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1273)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1079)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3441)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3100)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
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:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
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:592)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
Eclipse sometimes behaves in weird manner. All all your source code folders ok? Please check all folder first. If they are ok then there must be something with the core plugins OR the workspace in which you have all your projects.
First copy your workspace, then install another instance of eclipse. Try to open the workspace in that eclipse.
If that doesn't work, it seems a big problem. May be you need to import all projects again in new workspace.
For better performance, you should keep number of projects in workspace somewhat limited. It seems you have many projects inside one workspace which might cause memory problems and slower your eclipse.
I hope, this works for you.
---EDIT on 21st May,2010---
After searching it ,it seems a bug in eclipse 3.4. Thought it shows a bug of WinXP, may be it affects MAC also.
Please check the link below. They have specified version 3.4 M6.
So if you are using older version of eclipse then please get newer from this link.
Also please check to have JDK 1.6 (Stable version) installed on your mac.
Eclipse download: http://www.eclipse.org/downloads/
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=217707
Hope this helps.
thanks.
Can you check the Console (Applications -> Utilities -> Console.app) and see whether there are any specific messages from eclipse (and post them here if possible)?
A exception stack trace or something?
Maybe it might throw some light on whats going wrong.