我最近更新到eclipse的最新版本(2018-12),现在无法创建tomcat服务器。
我安装了tomcat 9.0.14,并将其添加到目标运行时,并且显示良好。
从“服务器”选项卡中,单击链接以创建新服务器,并显示错误消息msg,并显示以下错误:
An error has occurred. See error log for more details.
org.eclipse.wst.server.core.internal.ServerPlugin.isIdInUse(Ljava/lang/Object;Ljava/lang/String;)Z
工作空间/.metadata/.log文件具有此
!ENTRY org.eclipse.jface 4 2 2019-01-27 10:23:25.586
!MESSAGE Problems occurred when invoking code from plug-in:
"org.eclipse.jface".
!STACK 0
这是完整的堆栈跟踪:
java.lang.NoSuchMethodError:
org.eclipse.wst.server.core.internal.ServerPlugin.isIdInUse(Ljava/lang/Object;Ljava/lang/String;)Z
at org.eclipse.wst.server.ui.internal.wizard.page.NewManualServerComposite.loadServerImpl(NewManualServerComposite.java:531)
at org.eclipse.wst.server.ui.internal.wizard.page.NewManualServerComposite.handleTypeSelection(NewManualServerComposite.java:908)
at org.eclipse.wst.server.ui.internal.wizard.page.NewManualServerComposite$1.serverTypeSelected(NewManualServerComposite.java:183)
at org.eclipse.wst.server.ui.internal.viewers.ServerTypeComposite.handleTreeSelectionChange(ServerTypeComposite.java:87)
at org.eclipse.wst.server.ui.internal.viewers.ServerTypeComposite$2.selectionChanged(ServerTypeComposite.java:70)
at org.eclipse.jface.viewers.Viewer$1.run(Viewer.java:158)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:47)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:176)
at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:155)
at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2182)
at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1225)
at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1254)
at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:243)
at org.eclipse.jface.util.OpenStrategy.access$4(OpenStrategy.java:238)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:403)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5663)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1386)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4931)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4472)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:822)
at org.eclipse.jface.window.Window.open(Window.java:798)
at org.eclipse.wst.server.ui.internal.cnf.ServersView2$1.widgetSelected(ServersView2.java:116)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:252)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5663)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1386)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1412)
at org.eclipse.swt.widgets.Widget.sendSelectionEvent(Widget.java:1526)
at org.eclipse.swt.widgets.Link.gtk_button_release_event(Link.java:387)
at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1946)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:6298)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5880)
at org.eclipse.swt.internal.gtk.GTK._gtk_main_do_event(Native Method)
at org.eclipse.swt.internal.gtk.GTK.gtk_main_do_event(GTK.java:3969)
at org.eclipse.swt.widgets.Display.eventProc(Display.java:1385)
at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:1581)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4470)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:636)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:563)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:151)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:155)
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:400)
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:564)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:595)
at org.eclipse.equinox.launcher.Main.run(Main.java:1501)
at org.eclipse.equinox.launcher.Main.main(Main.java:1474)
我尝试使用-clean arg从命令行运行eclipse。我删除了工作空间文件夹的内容,重新导入了项目,然后重试。
java版本
$ java -version
openjdk version "10.0.2" 2018-07-17
OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4)
OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4, mixed mode)
在ubuntu Ubuntu 18.04.1 LTS上运行
感谢您的帮助。