eclipse-cdo / cdo

Eclipse Public License 1.0
2 stars 6 forks source link

Net4J WS transport is broken with Jetty 12 #63

Open mPorhel opened 2 months ago

mPorhel commented 2 months ago

With CDO master for 2024-09 using Jetty 12, CDO Net4J WebSocket based transport is no more working.

Launching org.eclipse.emf.cdo.tests.AllTestsWS fails with lots of

[ERROR] org.eclipse.jetty.websocket.core.exception.UpgradeException: Failed to upgrade to websocket: Unexpected HTTP Response Status Code: 404 Not Found
org.eclipse.jetty.websocket.api.exceptions.UpgradeException: org.eclipse.jetty.websocket.core.exception.UpgradeException: Failed to upgrade to websocket: Unexpected HTTP Response Status Code: 404 Not Found
    at org.eclipse.jetty.websocket.common.JettyWebSocketFrameHandler.convertCause(JettyWebSocketFrameHandler.java:532)
    at org.eclipse.jetty.websocket.common.JettyWebSocketFrameHandler.onError(JettyWebSocketFrameHandler.java:258)
    at org.eclipse.jetty.websocket.core.client.CoreClientUpgradeRequest.handleException(CoreClientUpgradeRequest.java:247)
    at org.eclipse.jetty.websocket.core.client.CoreClientUpgradeRequest.onComplete(CoreClientUpgradeRequest.java:235)
    at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:213)
    at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:205)
    at org.eclipse.jetty.client.HttpReceiver.terminateResponse(HttpReceiver.java:477)
    at org.eclipse.jetty.client.HttpReceiver.terminateResponse(HttpReceiver.java:457)
    at org.eclipse.jetty.client.HttpReceiver.responseSuccess(HttpReceiver.java:420)
    at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.messageComplete(HttpReceiverOverHTTP.java:386)
    at org.eclipse.jetty.http.HttpParser.handleContentMessage(HttpParser.java:587)
    at org.eclipse.jetty.http.HttpParser.parseContent(HttpParser.java:1727)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1556)
    at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.parse(HttpReceiverOverHTTP.java:221)
    at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:160)
    at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:91)
    at org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:90)
    at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:194)
    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:314)
    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100)
    at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:969)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1194)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1149)
    at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: org.eclipse.jetty.websocket.core.exception.UpgradeException: Failed to upgrade to websocket: Unexpected HTTP Response Status Code: 404 Not Found
mPorhel commented 2 months ago

To sum-up the situation with shortcuts: during recent tp updates the net4j.ws client code has moved from Jetty 10 behavior to Jetty 12 specific implementation and not the test server which is also not able to deploy the current servlet.

I have a pretty simples set of changes (mainly addition of .ee8. in qualified names and dependencies + releng/tp + one fix) and org.eclipse.emf.cdo.tests.AllTestsWS having no error nor failure for its 11823 tests : see #64

There is no implementation change in the Net4JWebSocket and Net4JWebSocketServlet, just a move to the corresponding APIs in Jetty 12 compared to the ones used in previous versions using Jetty 10.0.x:

Jetty provides different implementations of the WebSocket protocol: