wiremock / wiremock

A tool for mocking HTTP services
https://wiremock.org/
Apache License 2.0
6.29k stars 1.42k forks source link

wiremock-jetty12: NullPointerException within WireMockHandlerDispatchingServlet (similar to #1224) #2697

Open finalchild opened 5 months ago

finalchild commented 5 months ago

Proposal

Using wiremock-jetty12. Doesn't happen in wiremock-standalone.

After the first test (that is, mockServer.start() -> stubFor() -> resetAll() -> stop() -> start() -> stubFor()), WireMockHandlerDispatchingServlet fails to initialize requestHandler to non-null, making the requests return 500 from second tests onward.

requestHandler = (RequestHandler) context.getAttribute(handlerClassName);

This returns null.

Reproduction steps

I'm too busy debugging all the issues from upgrading our dependencies right now. I'll try to provide minimal reproduction code soon.

References

No response

tomakehurst commented 4 months ago

Thanks for reporting. Will await the repro case.