java – FakeHttpServer crashes when upgrading to Jetty 9


I'm migrating an application that used Jetty 7.4.5.v20110725 to Jetty 9.3.0.M2 using Maven . I have already updated javax.servlet-api to versão 3.1.0 .

But, I am using FakeHttpServer version 0.3.0 for testing, and there is currently no newer version. It uses the org.eclipse.jetty.server.nio.SelectChannelConnector class that used to exist until Jetty 8.x, but no longer exists in Jetty 9.

At this point, my project crashes at runtime with a NoClassDefFoundError because of the removed Jetty class that FakeHttpServer tries to use, preventing me from completing the Jetty upgrade. How can I fix this?

Note: This was also posted on StackOverflow in English:


As answered in English by Joakim Erdfelt on Stack Overflow in English, the only way out is to update the FakeHttpServer. Whether it's convincing the original authors to do it, or doing it myself.


Scroll to Top