Blogroll

Tech Travels

JBoss, eclipse and port bindings

Starting JBoss (5.1.x) from eclipse (3.5.x) it could happen that you get an exception like the following:

15:26:51,530 ERROR [Naming] Could not start on port 1099
java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at javax.net.DefaultServerSocketFactory.createServerSocket(Unknown Source)
at org.jnp.server.Main.initBootstrapListener(Main.java:480)
at org.jnp.server.Main.start(Main.java:427)
...

It’s because you have a port already in use. In this case it the port used for Naming service. While changing port from the eclipse editor didn’t work, you can (after stopping the server), open the file