【问题标题】:issue with GWT eclipse pluginGWT eclipse插件的问题
【发布时间】:2011-05-26 02:22:07
【问题描述】:

我一直对 Linux 机器(opensuse 11.4)中的 GWT eclipse (helios) 插件有问题。

有时如果我停止开发模式服务器,然后尝试“运行为-> Web 应用程序”,它会给我以下错误。有时这不会出错,并且开发模式应用程序由 gwt eclipse 插件启动。

也许开发模式服务器在我用“开发模式”视图选项卡右侧的红色按钮停止它之后仍然运行一段时间。任何想法这个问题是关于什么的?


Starting Jetty on port 8888
Port 127.0.0.1:8888 is already is use; you probably still have another session active   [WARN] failed SelectChannelConnector@127.0.0.1:8888
java.net.BindException: Address already in use
    at sun.nio.ch.Net.bind(Native Method)
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:137)
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:77)
    at org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:205)
    at org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:304)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
    at org.mortbay.jetty.Server.doStart(Server.java:233)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
    at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:565)
    at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:494)
    at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1058)
    at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:800)
    at com.google.gwt.dev.DevMode.main(DevMode.java:304)
   [WARN] failed Server@1f34a6
java.net.BindException: Address already in use
    at sun.nio.ch.Net.bind(Native Method)
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:137)
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:77)
    at org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:205)
    at org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:304)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
    at org.mortbay.jetty.Server.doStart(Server.java:233)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
    at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:565)
    at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:494)
    at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1058)
    at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:800)
    at com.google.gwt.dev.DevMode.main(DevMode.java:304)
[ERROR] shell failed in doStartupServer method

【问题讨论】:

    标签: linux eclipse gwt plugins embedded-jetty


    【解决方案1】:

    GWT 开发模式的一个常见问题是启动第二个开发模式会话,而会话已经在运行。解决方案通常是在开始新会话之前停止所有开发模式会话(点击开发模式选项卡上的红色停止按钮)。然后,我通常会点击“X”或“XX”按钮来关闭分层窗口。

    虽然我很少这样做,但可以同时运行多个开发模式会话,但您需要编辑启动配置并将开发模式和代码服务器的端口更改为某些东西除了默认的 8888 和 9997。

    【讨论】:

      【解决方案2】:

      我不了解您的系统,但在我看来,您的某些程序正在使用 8888 端口。您可以在

      下更改 prot

      运行配置 --> 服务器

      【讨论】:

        【解决方案3】:

        我经常看到此错误,并且我 100% 确定我没有运行第二个实例。 通常,在 Eclipse 中,即使我按下红色方形按钮来停止 devmode 服务器,它也会继续运行。这种情况经常发生,以至于我创建了这个脚本,我从任务栏上的图标启动:

        !/bin/bash

        devmode=$(jps | grep DevMode) [ ! "$devmode" ] && 退出

        pid=$(echo $devmode | cols 1) 回声$pid 杀死 -9 $pid

        但即便如此,仍然我经常遇到同样的错误。我什至检查端口 8888 上是否没有任何东西在监听。什么都没有。然而这个错误。 加上这个长时间的延迟“等待启动 URL...”。它在做什么?告诉 Google 我正在运行一个应用?

        我认为 GWT 很棒,但这些小故障令人沮丧!

        【讨论】:

          【解决方案4】:

          我一遍又一遍地遇到这个错误。如果我在点击 Eclipse 中的停止按钮之前关闭浏览器,就会发生这种情况。我唯一的解决方案是关闭并重新启动 Eclipse。这是对此的普遍建议。这是解决方案: 右键单击您的项目。 选择运行方式...运行配置。 选择“服务器”选项卡。 在“自动选择未使用的端口”旁边打勾 点击“运行”

          【讨论】:

            【解决方案5】:

            这是大多数 IDE 的常见问题。尝试访问任务管理器,并杀死所有 java.exe JVM 进程。这应该释放端口。 IDE 和像 tomcat 这样的服务器通常在它们自己的 exe 文件中运行。

            请理解,通过终止所有 java.exe 进程,您将终止任何正在运行的基于 JVM 的程序,因此只有在您认为合适的情况下才这样做。

            【讨论】:

              猜你喜欢
              • 1970-01-01
              • 1970-01-01
              • 2014-07-15
              • 1970-01-01
              • 1970-01-01
              • 1970-01-01
              • 2014-03-22
              • 2011-08-09
              • 1970-01-01
              相关资源
              最近更新 更多