Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-6746

HttpsMapper cannot deal with resources over websockets

    XMLWordPrintableJSON

    Details

      Description

      Wicket Examples WebSocket demo "Initiate download with Web Socket message" is broken in current master due to the new wicket-core.css:

      ERROR - DefaultExceptionMapper     - unexpected exception when handling another exception: An error occurred while generating an Url for handler 'ResourceReferenceRequestHandler{resourceReference=scope: org.apache.wicket.css.WicketCoreCSSResourceReference; name: wicket-core.css; locale: null; style: null; variation: null, pageParameters=}'
      org.apache.wicket.WicketRuntimeException: An error occurred while generating an Url for handler 'ResourceReferenceRequestHandler{resourceReference=scope: org.apache.wicket.css.WicketCoreCSSResourceReference; name: wicket-core.css; locale: null; style: null; variation: null, pageParameters=}'
      	at org.apache.wicket.request.cycle.RequestCycle.urlFor(RequestCycle.java:560)
      	at org.apache.wicket.markup.head.CssReferenceHeaderItem.getUrl(CssReferenceHeaderItem.java:151)
      	at org.apache.wicket.markup.head.CssReferenceHeaderItem.getRenderTokens(CssReferenceHeaderItem.java:138)
      	at org.apache.wicket.markup.head.internal.HeaderResponse.wasItemRendered(HeaderResponse.java:61)
      	at org.apache.wicket.markup.head.internal.HeaderResponse.render(HeaderResponse.java:52)
      	at org.apache.wicket.page.PartialPageUpdate$PartialHeaderResponse.render(PartialPageUpdate.java:702)
      	at org.apache.wicket.markup.head.ResourceAggregator.renderHeaderItems(ResourceAggregator.java:339)
      	at org.apache.wicket.markup.head.ResourceAggregator.close(ResourceAggregator.java:308)
      	at org.apache.wicket.page.PartialPageUpdate.writeComponents(PartialPageUpdate.java:299)
      	at org.apache.wicket.page.PartialPageUpdate.writeTo(PartialPageUpdate.java:167)
      	at org.apache.wicket.protocol.ws.api.WebSocketRequestHandler.respond(WebSocketRequestHandler.java:239)
      	at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:917)
      	at org.apache.wicket.request.RequestHandlerExecutor.execute(RequestHandlerExecutor.java:63)
      	at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:283)
      	at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:254)
      	at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:222)
      	at org.apache.wicket.protocol.ws.api.AbstractWebSocketProcessor.broadcastMessage(AbstractWebSocketProcessor.java:260)
      	at org.apache.wicket.protocol.ws.api.AbstractWebSocketProcessor.onMessage(AbstractWebSocketProcessor.java:148)
      	at org.apache.wicket.protocol.ws.javax.JavaxWebSocketProcessor$StringMessageHandler.onMessage(JavaxWebSocketProcessor.java:65)
      	at org.apache.wicket.protocol.ws.javax.JavaxWebSocketProcessor$StringMessageHandler.onMessage(JavaxWebSocketProcessor.java:60)
      	at org.apache.tomcat.websocket.WsFrameBase.sendMessageText(WsFrameBase.java:395)
      	at org.apache.tomcat.websocket.server.WsFrameServer.sendMessageText(WsFrameServer.java:119)
      	at org.apache.tomcat.websocket.WsFrameBase.processDataText(WsFrameBase.java:495)
      	at org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:294)
      	at org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:133)
      	at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:82)
      	at org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:171)
      	at org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:151)
      	at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:148)
      	at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:54)
      	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:59)
      	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1639)
      	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      	at java.base/java.lang.Thread.run(Thread.java:834)
      Caused by: java.lang.IllegalStateException: Could not resolve protocol for request: org.apache.wicket.protocol.ws.api.ServletRequestCopy@5c61f8d8
      	at org.apache.wicket.protocol.https.HttpsMapper.getSchemeOf(HttpsMapper.java:224)
      	at org.apache.wicket.protocol.https.HttpsMapper.mapHandler(HttpsMapper.java:176)
      	at org.apache.wicket.protocol.https.HttpsMapper.mapHandler(HttpsMapper.java:121)
      	at org.apache.wicket.request.mapper.CompoundRequestMapper.mapHandler(CompoundRequestMapper.java:210)
      	at org.apache.wicket.protocol.ws.api.WebSocketRequestMapper.mapHandler(WebSocketRequestMapper.java:61)
      	at org.apache.wicket.request.cycle.RequestCycle.mapUrlFor(RequestCycle.java:454)
      	at org.apache.wicket.request.cycle.RequestCycle.urlFor(RequestCycle.java:554)
      	... 37 more
      WARN  - WebSocketResponse          - An HTTP error response in WebSocket communication would not be processed by the browser! If you need to send the error code and message to the client then configure custom WebSocketResponse via WebSocketSettings#newWebSocketResponse() factory method and override #sendError() method to write them in an appropriate format for your application. The ignored error code is '500' and the message: 'null'.
      

        Attachments

        1. wicket-6746.tar.gz
          22 kB
          Emond Papegaaij

          Activity

            People

            • Assignee:
              papegaaij Emond Papegaaij
              Reporter:
              mgrigorov Martin Tzvetanov Grigorov
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: