简体   繁体   English

GWT eclipse 插件问题

[英]issue with GWT eclipse plugin

i keep having an issue with GWT eclipse (helios) plugin in Linux box (opensuse 11.4).我一直遇到 Linux 盒子(opensuse 11.4)中的 GWT eclipse(helios)插件的问题。

sometimes if i stop the dev mode server and then try "Run as-> web Application" it gives me the below error.有时,如果我停止开发模式服务器,然后尝试“运行方式-> web 应用程序”,它会给我以下错误。 sometimes this doesn't give error and the dev mode app is started by the gwt eclipse plugin.有时这不会给出错误,并且开发模式应用程序由 gwt eclipse 插件启动。

maybe the dev mode server remains running for sometime after i stop it with red button at right of "development mode" view tab.在我用“开发模式”视图选项卡右侧的红色按钮将其停止后,开发模式服务器可能会继续运行一段时间。 any Idea what this problem is about?任何想法这个问题是关于什么的?


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

A common issue with GWT development mode is starting a second development mode session while one is already running. GWT 开发模式的一个常见问题是启动第二种开发模式 session 而其中一个已经在运行。 The solution usually is to just stop all Development mode sessions before starting a new one (hit the red stop button on the Development mode tab).解决方案通常是在开始新会话之前停止所有开发模式会话(点击开发模式选项卡上的红色停止按钮)。 Then, I usually hit the 'X' or 'XX' button to dismiss that layered window.然后,我通常点击“X”或“XX”按钮来关闭分层的 window。

Although I've only rarely wanted to do this, it is possible to run more than one development mode session simultaneously, but you'll need to edit the launch config and change the ports of the development mode and code server to something other than the defaults of 8888 and 9997.虽然我只是很少想这样做,但可以同时运行多个开发模式 session,但是您需要编辑启动配置并将开发模式和代码服务器的端口更改为不同于默认值为 8888 和 9997。

I don't know your system, but it looks to me like some program of you is using the 8888 port to.我不知道您的系统,但在我看来,您的某些程序正在使用 8888 端口。 You can change the prot under您可以在下面更改pro

run configuration --> Server运行配置 --> 服务器

I frequently see this error, and I'm 100% sure that I'm not running a second instance.我经常看到这个错误,我 100% 确定我没有运行第二个实例。 Often, in Eclipse, even though I pressed the red square button to stop the devmode server, it keeps on running.通常,在 Eclipse 中,即使我按下红色方形按钮来停止 devmode 服务器,它也会继续运行。 This happens so often that I created this script which I launch from an icon on the task bar:这种情况经常发生,以至于我创建了这个脚本,我从任务栏上的图标启动:

!/bin/bash !/bin/bash

devmode=$(jps | grep DevMode) [ !开发模式=$(jps | grep 开发模式)[! "$devmode" ] && exit "$devmode" ] && 退出

pid=$(echo $devmode | cols 1) echo $pid kill -9 $pid pid=$(echo $devmode | cols 1) echo $pid kill -9 $pid

But even THEN, STILL I often get this same error.但即便如此,我仍然经常遇到同样的错误。 I even check if nothing is listening on port 8888. Nothing.我什至检查端口 8888 上是否没有任何东西在监听。什么都没有。 Yet this error.然而这个错误。 Plus this LONG delay "Waiting for launch URLs...".加上这个长时间的延迟“等待启动 URL...”。 What's it doing?它在做什么? Telling Google that I'm running an app?告诉 Google 我正在运行一个应用程序?

I think GWT is amazing, but these little glitches are frustrating!我认为 GWT 很棒,但是这些小故障令人沮丧!

I ran into this error over and over again.我一遍又一遍地遇到这个错误。 It would happen if I closed my browser before hitting the stop button in Eclipse.如果我在点击 Eclipse 中的停止按钮之前关闭浏览器,就会发生这种情况。 The only solution I had was to close and restart Eclipse.我唯一的解决方案是关闭并重新启动 Eclipse。 That is a common recommendation for this.这是对此的普遍建议。 Here's the solution: Right-click on your project.这是解决方案:右键单击您的项目。 Select Run As...Run Configurations. Select 运行方式...运行配置。 Select "Server" tab. Select“服务器”选项卡。 Place a Check next to "Automatically select an unused port" Click "Run"在“自动 select 一个未使用的端口”旁边打勾点击“运行”

This is a common problem with most IDEs.这是大多数 IDE 的常见问题。 Try accessing the task manager, and kill all the java.exe JVM processes.尝试访问任务管理器,并杀死所有 java.exe JVM 进程。 This should free up the port.这应该释放端口。 IDE's and servers like tomcat run in their own exe files, usually. IDE 和像 tomcat 这样的服务器通常在它们自己的 exe 文件中运行。

Understand that by killing all java.exe processes, you are killing off any running JVM based program, so do so only if that is okay for you.了解通过杀死所有 java.exe 进程,你正在杀死任何正在运行的基于 JVM 的程序,所以只有在你觉得可以的情况下才这样做。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM