Address Already In Use

Symptom

When you try to launch your application in WOLips, you get the following message in the console tab and your application fails to start.

May 25 13:12:33 MyGreatWOApp[N/A] WARN NSLog - Unable to establish a connection to port 9001 on this host. Perhaps this port is already in use by another WebObjects application instance.
May 25 13:12:33 MyGreatWOApp[N/A] WARN NSLog - <WOApplication>: Cannot be initialized.java.lang.reflect.InvocationTargetException
May 25 13:12:33 MyGreatWOApp[N/A] WARN NSLog - A fatal exception occurred: <WOApplication>: Cannot be initialized.
[2011-5-25 13:12:33 UTC] <main> com.webobjects.foundation.NSForwardException [java.net.BindException] Address already in use:<WOApplication>: Cannot be initialized.
Causes & Resolutions

This can happen for a couple reasons:

  1. You've launched an instance of your application already in Eclipse, and it's still running.
    1. Find your application in the Console tab of Eclipse and stop it.
    2. On Mac OS X, open Activity Monitor.app, look for a process called "Java" and force quit it.
  2. Some other process on your machine is running on that port.
    1. Pick a different WOPort number to use.