Please update Jetty in Wiremock

893 views
Skip to first unread message

Nicolas Nobelis

unread,
Sep 8, 2022, 8:06:03 AM9/8/22
to wiremock-user

Hello,

When using Wiremock 2.33.2 in a KTor 2 project, we are facing the following issue :

```
java.lang.UnsupportedOperationException: Use .getMatched(String) instead
    at org.eclipse.jetty.http.pathmap.PathMappings.getMatch(PathMappings.java:259)
    at org.eclipse.jetty.servlet.ServletHandler.getMappedServlet(ServletHandler.java:572)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:468)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:763)
    at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
    at org.eclipse.jetty.server.Server.handle(Server.java:516)
    at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487)
    at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
    at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
    at java.base/java.lang.Thread.run(Thread.java:829)
```

This is a Jetty dependency version clash between KTor and Wiremock.
Wiremock depends on Jetty in version 9.4.46.v20220331 and KTor depends on Jetty 9.4.48.v20220622.

Please update Wiremock Jetty dependency to a more recent version.
(This would also help people complaining about security vulnerabilities in Jetty).

Thanks in advance
Nicolas Nobelis

Tom Akehurst

unread,
Sep 8, 2022, 1:19:49 PM9/8/22
to wiremock-user
We'll update this in the next release within the next few days. In the meantime I suggest switching to the standalone JAR so that WireMock will use its own shaded copy of Jetty.

Nicolas Nobelis

unread,
Sep 9, 2022, 2:11:54 AM9/9/22
to wiremock-user
Perfect ! Thanks a lot for your quick answer :)
Reply all
Reply to author
Forward
0 new messages