【问题标题】:Google App Engine fails to launch in EclipseGoogle App Engine 无法在 Eclipse 中启动
【发布时间】:2017-04-25 14:36:38
【问题描述】:

我在 Eclipse 中启动 Google App Engine 时遇到问题。

我通过选择“Hello World 模板”使用 Eclipse 的 Google Cloud Tools 插件创建了一个新的“基于 Maven 的 Google App Engine 标准 Java 项目”。

然后我尝试通过右键单击 Package Explorer 中的项目并选择“运行方式 > App Engine”选项来启动应用程序。

应用程序无法启动。错误日志中出现以下堆栈跟踪:

java.lang.NullPointerException
    at com.google.cloud.tools.eclipse.appengine.localserver.launching.LaunchHelper.findExistingServers(LaunchHelper.java:110)
    at com.google.cloud.tools.eclipse.appengine.localserver.launching.LaunchHelper.launch(LaunchHelper.java:61)
    at com.google.cloud.tools.eclipse.appengine.localserver.launching.LocalAppEngineStandardLaunchShortcut.launch(LocalAppEngineStandardLaunchShortcut.java:44)
    at org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension.launch(LaunchShortcutExtension.java:431)
    at org.eclipse.debug.internal.ui.actions.LaunchShortcutAction.run(LaunchShortcutAction.java:74)
    at org.eclipse.debug.internal.ui.actions.LaunchShortcutAction.runWithEvent(LaunchShortcutAction.java:123)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:420)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4362)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113)

这是我的会话数据:

eclipse.buildId=4.5.2.M20160212-1500
java.version=1.8.0_111
java.vendor=Oracle Corporation

我错过了什么?是否需要另一个步骤才能使应用程序成功启动?

【问题讨论】:

    标签: java eclipse maven google-app-engine


    【解决方案1】:

    NPE 永远不会发生,从查看代码来看,您似乎有一个损坏的服务器定义。您可以打开 Servers 视图并删除所有损坏的服务器,然后重试。

    但在此之前,如果您不介意,我们首先感谢您提供有关此 GitHub issue 的更多详细信息,包括您的 .../.metadata/.plugins/org.eclipse.wst.server.core/servers.xml 文件,服务器 视图的屏幕截图,以及重现的确切步骤,以便我们修复它。

    【讨论】:

    • 我有一台旧的Google Plugin for Eclipse 的服务器在闲逛。删除此服务器确实可以解决问题。抱歉,我在看到您的评论之前已将其删除。因此,我无法为您提供旧的 servers.xml 文件。
    • 我们能够重现,修复将在下一个版本中。感谢您的跟进!
    猜你喜欢
    • 1970-01-01
    • 2020-02-28
    • 1970-01-01
    • 2013-03-05
    • 1970-01-01
    • 2016-04-30
    • 1970-01-01
    • 2010-10-22
    • 1970-01-01
    相关资源
    最近更新 更多