2
votes

I am getting the following error while running gwt application.

java.net.BindException: Address already in use: bind at sun.nio.ch.Net.bind(Native Method) at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source) at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source) 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:672) at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509) at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1068) at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:811) at com.google.gwt.dev.DevMode.main(DevMode.java:311)

Please help me to sort out this

4

4 Answers

1
votes

You have to stop all the instances running. If you do click in the red button you only stop one instance. You have to choose the Development mode tab, do click in the left down corner (name of your project), and check all instances.

0
votes

The port you are attempting to use is already being used:
One of he possibilities:

You started another instance of the server when an old one is already running

To solve this:

  1. Stop all the instances running
  2. From the properties check the check-box of using different port every time the server starts
0
votes

Try change your port number of the server for JVM binding.

-1
votes

Probably your application is already running or something else is using the port. By default the DevMode uses 8888 port. You can change the port if it is used by other application.

In Eclipse, you can alter the port by changing the Port field for your Web Application, under Run Configurations (the Port from the Server tab).enter image description here Or if you are using attaching to your application using gwt plugin (by using the ?gwt.codesvr in url), the default port is 9997 and you can alter the port in the GWT tab from the same run configuration. enter image description here

If you are running in other IDE or from command line you can use the details from Development Mode Options section (see: https://developers.google.com/web-toolkit/doc/latest/DevGuideCompilingAndDebugging ) the -port, -bindAddress and -codeServerPort options.