eclipse 在以下过程中发生内部错误:“正在从所选内容中请求Java AST”. java.lang.NoSuchMethodError:是替代项(C)Z

23c0lvtd  于 2022-12-18  发布在  Eclipse
关注(0)|答案(1)|浏览(498)

I'm using

  • eclipse.buildId=4.24.0.I20220607-0700
  • java.version=11.0.17.
  • BootLoader constants: OS=macosx, ARCH=aarch64, WS=cocoa

Error: An internal error occurred during: "Requesting Java AST from selection". java.lang.NoSuchMethodError: com.ibm.icu.text.UTF16.isSurrogate(C)Z
This error occurred after downloading the Oracle WebLogic Server Tools plugin (17.3.0.201903121357) on eclipse.
From what I've found, it's probably because there are two versions of ICU4J, and the 72v only has this method boolean isSurrogate(int codePoint) and not boolean isSurrogate(char char16) .

Does anyone know how to fix this without upgrading eclipse to 4.25? As it seems like 4.24 is the most recent version that supports Java 11.
I've already tried deleting the ICU4J 72 plugin manually but it removes maven from my eclipse.
Full error logs:
An internal error occurred during: "Requesting Java AST from selection". java.lang.NoSuchMethodError: com.ibm.icu.text.UTF16.isSurrogate(C)Z at org.eclipse.jdt.internal.ui.text.JavaWordFinder.findWord(JavaWordFinder.java:39) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.updateOccurrenceAnnotations(JavaEditor.java:3300) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.lambda$4(JavaEditor.java:3363) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java:175) at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup$1.run(SelectionListenerWithASTManager.java:151) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench". java.lang.NoSuchMethodError: com.ibm.icu.text.UTF16.isSurrogate(C)Z at org.eclipse.jdt.internal.ui.text.JavaWordFinder.findWord(JavaWordFinder.java:39) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.updateOccurrenceAnnotations(JavaEditor.java:3300) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor$ActivationListener.windowActivated(JavaEditor.java:1216) at org.eclipse.ui.internal.Workbench$8.run(Workbench.java:1005) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) at org.eclipse.ui.internal.Workbench.fireWindowActivated(Workbench.java:1002) at org.eclipse.ui.internal.WorkbenchWindow$6.shellActivated(WorkbenchWindow.java:2459) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:92) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4604) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1524) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1547) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1528) at org.eclipse.swt.widgets.Shell.windowDidBecomeKey(Shell.java:2314) at org.eclipse.swt.widgets.Display.windowProc(Display.java:6373) at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method) at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:229) at org.eclipse.swt.widgets.Widget.becomeKeyWindow(Widget.java:390) at org.eclipse.swt.widgets.Shell.becomeKeyWindow(Shell.java:533) at org.eclipse.swt.widgets.Display.windowProc(Display.java:6092) at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method) at org.eclipse.swt.internal.cocoa.NSWindow.close(NSWindow.java:57) at org.eclipse.swt.widgets.Shell.destroyWidget(Shell.java:819) at org.eclipse.swt.widgets.Widget.release(Widget.java:1373) at org.eclipse.swt.widgets.Control.release(Control.java:2970) at org.eclipse.swt.widgets.Widget.dispose(Widget.java:695) at org.eclipse.jface.window.Window.close(Window.java:335) at org.eclipse.jface.dialogs.Dialog.close(Dialog.java:988) at org.eclipse.ui.internal.statushandlers.InternalDialog.close(InternalDialog.java:651) at org.eclipse.jface.window.Window.handleShellCloseEvent(Window.java:739) at org.eclipse.jface.dialogs.TrayDialog.handleShellCloseEvent(TrayDialog.java:220) at org.eclipse.jface.window.Window$1.shellClosed(Window.java:685) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:102) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4604) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1524) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1547) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1532) at org.eclipse.swt.widgets.Shell.closeWidget(Shell.java:624) at org.eclipse.swt.widgets.Shell.windowShouldClose(Shell.java:2518) at org.eclipse.swt.widgets.Display.windowProc(Display.java:6278) at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method) at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:236) at org.eclipse.swt.widgets.Widget.windowSendEvent(Widget.java:2162) at org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:2487) at org.eclipse.swt.widgets.Display.windowProc(Display.java:6405) at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method) at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:5653) at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5792) at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method) at org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:117) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3963) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155) 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:136) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402) 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:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) 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)

w8biq8rn

w8biq8rn1#

4.25和4.26都支持Java 11的 * 开发 *,只是有一些需要Java 17才能正常运行的组件,可以从https://adoptium.net/temurin/releases/下载兼容的JDK。
如果有更新的WebLogic插件,你也应该得到它。版本17.3.0.201903121357表示2019年的构建版本。

相关问题