Before actually leaving the stop() method, makes sure that the background thread running Jetty has actually stopped. Not doing so caused dereferencing of invalid objects (service references, ..).