issue with GWT eclipse plugin
i keep having an issue with GWT eclipse (helios) plugin in Linux box (opensuse 11.4).
sometimes if i stop the dev mode server and then try "Run as-> web Application" it gives me the below error. sometimes this doesn't give error and the dev mode app is started by the gwt eclipse plugin.
maybe the dev mode server remains running for sometime after i stop it w开发者_开发百科ith 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. 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.
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.
I don't know your system, but it looks to me like some program of you is using the 8888 port to. You can change the prot under
run configuration --> Server
I frequently see this error, and I'm 100% sure that I'm not running a second instance. Often, in Eclipse, even though I pressed the red square button to stop the devmode server, it keeps on running. This happens so often that I created this script which I launch from an icon on the task bar:
!/bin/bash
devmode=$(jps | grep DevMode) [ ! "$devmode" ] && exit
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. Yet this error. Plus this LONG delay "Waiting for launch URLs...". What's it doing? Telling Google that I'm running an app?
I think GWT is amazing, but these little glitches are frustrating!
I ran into this error over and over again. It would happen if I closed my browser before hitting the stop button in Eclipse. The only solution I had was to close and restart Eclipse. That is a common recommendation for this. Here's the solution: Right-click on your project. Select Run As...Run Configurations. Select "Server" tab. Place a Check next to "Automatically select an unused port" Click "Run"
This is a common problem with most IDEs. Try accessing the task manager, and kill all the java.exe JVM processes. This should free up the port. IDE's and servers like tomcat run in their own exe files, usually.
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.
精彩评论