Fakehttpserver breaks when upgrading to Jetty 9

Asked

Viewed 57 times

3

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

But, I’m using the Fakehttpserver version 0.3.0 for testing, and there is currently no newer version. It uses the org.eclipse.jetty.server.nio.SelectChannelConnector which used to exist until Jetty 8.x, but no longer exists on Jetty 9.

At this point, my project breaks 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: https://stackoverflow.com/q/30309677/540552

  • According to suggestions made here and here, you can use the class ServerConnector.

  • @qmechanik The problem is having to tamper with a code that is not mine, which is Fakehttpserver. In fact I didn’t even expect to have to mess with that, the reason is that I needed to change the version of Jetty because a dependency needed version 9, and upgrading shouldn’t cause any major problems, except that another dependency uses Fakehttpserver and it broke. As a result, this change of Jetty has made me have two mutually incompatible dependencies.

1 answer

0


As answered in English by Joakim Erdfelt at Stack Overflow, the only way out is to upgrade Fakehttpserver. Whether by convincing the original authors to do it, or by doing it myself.

Source: https://stackoverflow.com/a/30311559/540552

Browser other questions tagged

You are not signed in. Login or sign up in order to post.