Eclipse Missing javax.xml.bind With Java 11 at Launch of Eclipse - 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?

Related

Document cannot be resolved to a type : I added a dependency of javax.xml

I am developing a RCP Application with its product.
When I export the product, the application does not work with xml-dom showing some errors as below.
I added javax.xml dependency both in plug-in project and the product configuration.
I am using eclipse 2021-09 and jdk 17.
and I removed java.xml in Module Dependencies, Java Build Path for the plug-in project since there were some error with "import javax.xml.*" saying that *** is accessible from more than one module: , java.xml.
I cleaned the project several time and then exported the product again.
It is working well when I run it from eclipse but does not work with a exported application.
I would appreciate for some help.
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.Error: Unresolved compilation problems:
Document cannot be resolved to a type
DocumentBuilderFactory cannot be resolved
NodeList cannot be resolved to a type
)
at org.eclipse.swt.SWT.error(SWT.java:4893)
at org.eclipse.swt.SWT.error(SWT.java:4808)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:188)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4029)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3629)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1041)
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:136)
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:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
at org.eclipse.equinox.launcher.Main.main(Main.java:1440)

Eclipse Refactoring (Renaming) throws ExecutionException caused by NullpoinerException

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

Lombok installation failed on IBM Rational Application Developer

I try to install Lombok on IBM Rational Application Developer and I don't succed. I've made all the steps that are necessary for an eclipse based IDE, but IDE can't start right know. If I delete the -javaagent argument that referes lombok from eclipse.ini, the IDE it will start again, but the lombok will not be ready for development.
I have the following exception in .log file from .metadata folder:
!ENTRY org.eclipse.osgi 4 0 2018-03-06 15:59:10.026
!MESSAGE Application error
!STACK 1
java.lang.NoClassDefFoundError: lombok.launch.PatchFixesHider$LombokDeps
at org.eclipse.core.internal.runtime.Product.addLombokNotesToEclipseAboutDialog(Product.java:151)
at org.eclipse.core.internal.runtime.Product.getProperty(Product.java:44)
at org.eclipse.ui.internal.ProductProperties.getAppName(ProductProperties.java:239)
at org.eclipse.ui.internal.ProductInfo.getAppName(ProductInfo.java:66)
at org.eclipse.ui.internal.WorkbenchPlugin.getAppName(WorkbenchPlugin.java:1038)
at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:655)
at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)
at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:154)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:96)
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:94)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:619)
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)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
Caused by: java.lang.ClassNotFoundException: lombok.launch.PatchFixesHider$LombokDeps
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:707)
... 22 more
I've already read all the suggestions from stackoverflow/github but nothing worked. I will appreciate any idea :)
Thank you :)
If I read the stacktrace correctly, the code fails where Lombok tries to patch the info screen to show that Lombok is installed correctly. It seems that RAD does not contain the same code here.
Please register a bug report.
Disclosure: I am a Lombok developer.

Can't generate java from UML using Acceleo in Eclipse

I am new to Eclipse and Acceleo, and I have been trying to complete the First Generator Model Tutorial. I am using Kepler 4.3 and Acceleo 3.X.
I am following the tutorial that generates java code from uml. The link is http://wiki.eclipse.org/Acceleo/Getting_Started. But when I try to run the generate.mtl file, the error log gives me the message:
Couldn't load class org.eclipse.acceleo.module.sample.main.Generate
from project org.eclipse.acceleo.module.sample
It also gives me the warning:
Couldn't load class org.eclipse.acceleo.module.sample.main.Generate.
Check that its containing package is exported.
and The activator org.eclipse.acceleo.module.sample.Activator for
bundle org.eclipse.acceleo.module.sample is invalid
org.osgi.framework.BundleException: The activator
org.eclipse.acceleo.module.sample.Activator for bundle
org.eclipse.acceleo.module.sample is invalid at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:172)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:679)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:300)
at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:478)
at
org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:263)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:236)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1212)
at
org.eclipse.acceleo.common.internal.utils.workspace.AcceleoWorkspaceUtil.getClass(AcceleoWorkspaceUtil.java:544)
at
org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoLaunchOperation.run(AcceleoLaunchOperation.java:103)
at
org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2345)
at
org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2327)
at
org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoPluginLaunchingStrategy.launch(AcceleoPluginLaunchingStrategy.java:259)
at
org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoPluginLaunchingStrategy.launch(AcceleoPluginLaunchingStrategy.java:161)
at
org.eclipse.acceleo.internal.ide.ui.launching.AcceleoLaunchDelegate.launch(AcceleoLaunchDelegate.java:51)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:858)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:707)
at
org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1018)
at
org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1222)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53) Caused
by: java.lang.ClassNotFoundException:
org.eclipse.acceleo.module.sample.Activator cannot be found by
org.eclipse.acceleo.module.sample_1.0.0.qualifier at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source) at
org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:340)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:165)
... 19 more Root exception: java.lang.ClassNotFoundException:
org.eclipse.acceleo.module.sample.Activator cannot be found by
org.eclipse.acceleo.module.sample_1.0.0.qualifier at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source) at
org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:340)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:165)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:679)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:300)
at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:478)
at
org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:263)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:236)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1212)
at
org.eclipse.acceleo.common.internal.utils.workspace.AcceleoWorkspaceUtil.getClass(AcceleoWorkspaceUtil.java:544)
at
org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoLaunchOperation.run(AcceleoLaunchOperation.java:103)
at
org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2345)
at
org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2327)
at
org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoPluginLaunchingStrategy.launch(AcceleoPluginLaunchingStrategy.java:259)
at
org.eclipse.acceleo.ide.ui.launching.strategy.AcceleoPluginLaunchingStrategy.launch(AcceleoPluginLaunchingStrategy.java:161)
at
org.eclipse.acceleo.internal.ide.ui.launching.AcceleoLaunchDelegate.launch(AcceleoLaunchDelegate.java:51)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:858)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:707)
at
org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1018)
at
org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1222)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
I have put the [comment #main/] below the template line and do all the steps in the tutorial, i really have no idea what the problem is.
I would appreciate any help or feedback.
java.lang.ClassNotFoundException: org.eclipse.acceleo.module.sample.Activator cannot be found by org.eclipse.acceleo.module.sample_1.0.0.qualifier
The most likely reason I can think of is that you have used the File > New Plug-in Project wizard and kept most of the default values, yet afterwards removed (or renamed) the "Activator" class that it created in your project.
The META-INF/MANIFEST.MF file of your project should contain a line that looks like :
Bundle-Activator: org.eclipse.acceleo.module.sample.Activator
And if it does, it most likely shows a warning or error on that line. You can either remove the line altogether or make sure you indeed have a plug-in activator with that qualified name.
I had exactly the same problem using Acceleo 3.5.0 on a clean Kepler and a clean Luna install. In Luna Acceleo displays a warning when you select the 'Acceleo Plugin Application' for the Runner in the run configuration. If you select 'Java Application' instead it works on Kepler.
A little research led me to the following 'fixed' bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=419205 . The 'fix' I guess was to add an error message in Luna telling us this feature doesn't work. I see exactly the same problem in Kepler and in Juno too with Acceleo 3.5 so it doesn't seem Luna specific at all.
Only workarounds I've found for this are to:
switch back to Acceleo 3.4 or
use only 'Java Application' referred to as 'standalone' in the documentation as it runs outside of Eclipse.
The problem with standalone is then you lose all the great features of Acceleo's debugger and interpreter, plus you have longer wait time testing your templates.
I corrected this error by updating the classpath in the MANIFEST.MF file :
I added the bin/ folder of the projet. It now works properly.
Etienne

Intellij 12 and internal compilation error when building scala project

I have just downloaded Intellij 12.01 (build #IC-123.94) and once I try to build a Scala project I get the following stacktrace:
Internal error: (java.lang.ClassNotFoundException) org.jetbrains.jps.incremental.BinaryContent
java.lang.ClassNotFoundException: org.jetbrains.jps.incremental.BinaryContent
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at org.jetbrains.jps.incremental.scala.LazyCompiledClass.<init>(ScalaBuilder.scala:239)
at org.jetbrains.jps.incremental.scala.IdeClient.generated(ScalaBuilder.scala:230)
at org.jetbrains.jps.incremental.scala.remote.ClientEventProcessor.process(ClientEventProcessor.scala:17)
at org.jetbrains.jps.incremental.scala.remote.RemoteServer$.liftedTree1$1(RemoteServer.scala:76)
at org.jetbrains.jps.incremental.scala.remote.RemoteServer$.org$jetbrains$jps$incremental$scala$remote$RemoteServer$$handle(RemoteServer.scala:74)
at org.jetbrains.jps.incremental.scala.remote.RemoteServer$$anonfun$send$1$$anonfun$apply$1$$anonfun$apply$3.apply(RemoteServer.scala:44)
at org.jetbrains.jps.incremental.scala.remote.RemoteServer$$anonfun$send$1$$anonfun$apply$1$$anonfun$apply$3.apply(RemoteServer.scala:43)
at org.jetbrains.jps.incremental.scala.package$.using(package.scala:15)
at org.jetbrains.jps.incremental.scala.remote.RemoteServer$$anonfun$send$1$$anonfun$apply$1.apply(RemoteServer.scala:43)
at org.jetbrains.jps.incremental.scala.remote.RemoteServer$$anonfun$send$1$$anonfun$apply$1.apply(RemoteServer.scala:40)
at org.jetbrains.jps.incremental.scala.package$.using(package.scala:15)
at org.jetbrains.jps.incremental.scala.remote.RemoteServer$$anonfun$send$1.apply(RemoteServer.scala:40)
at org.jetbrains.jps.incremental.scala.remote.RemoteServer$$anonfun$send$1.apply(RemoteServer.scala:39)
at org.jetbrains.jps.incremental.scala.package$.using(package.scala:15)
at org.jetbrains.jps.incremental.scala.remote.RemoteServer.send(RemoteServer.scala:39)
at org.jetbrains.jps.incremental.scala.remote.RemoteServer.compile(RemoteServer.scala:24)
at org.jetbrains.jps.incremental.scala.ScalaBuilder$$anonfun$5$$anonfun$apply$3$$anonfun$apply$4.apply(ScalaBuilder.scala:110)
at org.jetbrains.jps.incremental.scala.ScalaBuilder$$anonfun$5$$anonfun$apply$3$$anonfun$apply$4.apply(ScalaBuilder.scala:100)
at scala.util.Either$RightProjection.map(Either.scala:536)
at org.jetbrains.jps.incremental.scala.ScalaBuilder$$anonfun$5$$anonfun$apply$3.apply(ScalaBuilder.scala:100)
at org.jetbrains.jps.incremental.scala.ScalaBuilder$$anonfun$5$$anonfun$apply$3.apply(ScalaBuilder.scala:99)
at scala.util.Either$RightProjection.flatMap(Either.scala:523)
at org.jetbrains.jps.incremental.scala.ScalaBuilder$$anonfun$5.apply(ScalaBuilder.scala:99)
at org.jetbrains.jps.incremental.scala.ScalaBuilder$$anonfun$5.apply(ScalaBuilder.scala:98)
at scala.util.Either$RightProjection.flatMap(Either.scala:523)
at org.jetbrains.jps.incremental.scala.ScalaBuilder.doBuild(ScalaBuilder.scala:98)
at org.jetbrains.jps.incremental.scala.ScalaBuilder.build(ScalaBuilder.scala:67)
at org.jetbrains.jps.incremental.scala.ScalaBuilderService$ScalaBuilderDecorator.build(ScalaBuilderService.java:42)
at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:963)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:710)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:740)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:673)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:494)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:274)
at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:164)
at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:114)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:205)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:102)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$1.run(BuildMain.java:107)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:26)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Apparently, the problem comes from the openapi.jar inside the Intellij's lib folder, which was supposed to contain such a class.
Any pointers?
Regards.
Had the same issue with Idea 12, but after updating the Scala plugin to version 0.7.62, problem has been solved for me.
However, you can try to follow Idea's advice:
In case of any compilation problems you may enable the previous (internal) compiler by clearing:
Project Settings / Compiler / Use external build
Same issue for me too, fixed by updating to nightly builds (0.7.82), instructions available here: http://confluence.jetbrains.net/display/SCA/Scala+Plugin+Nightly+Builds+for+Leda