-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
Freshly, 8.5.0
-
Security Level: Jean
-
reproduced with both jetty 9.4 and tomcat 8.5
-
None
Steps to Reproduce
run the attached example websocket-include-defer.zul
click the button
Current Result
setting the src of an <include mode="defer"> causes the following exception
SEVERE: java.lang.IllegalArgumentException: Response cannot be null at javax.servlet.ServletResponseWrapper.<init>(ServletResponseWrapper.java:89) at javax.servlet.http.HttpServletResponseWrapper.<init>(HttpServletResponseWrapper.java:85) at org.zkoss.web.servlet.http.HttpBufferedResponse.<init>(HttpBufferedResponse.java:71) at org.zkoss.web.servlet.http.HttpBufferedResponse.getInstance(HttpBufferedResponse.java:54) at org.zkoss.zk.ui.http.ExecutionImpl.dispatch(ExecutionImpl.java:242) at org.zkoss.zk.ui.http.ExecutionImpl.include(ExecutionImpl.java:203) at org.zkoss.zul.Include.include(Include.java:706) at org.zkoss.zul.Include.renderProperties(Include.java:628) at org.zkoss.zk.ui.AbstractComponent.redraw(AbstractComponent.java:2153) at org.zkoss.zk.ui.impl.UiVisualizer.redraw(UiVisualizer.java:1003) at org.zkoss.zk.ui.impl.UiVisualizer.getResponses(UiVisualizer.java:699) at org.zkoss.zk.ui.impl.UiEngineImpl.getResponses(UiEngineImpl.java:1531) at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1337) at org.zkoss.zkmax.au.websocket.WebSocketEndPoint.process(WebSocketEndPoint.java:238) at org.zkoss.zkmax.au.websocket.WebSocketEndPoint.access$000(WebSocketEndPoint.java:58) at org.zkoss.zkmax.au.websocket.WebSocketEndPoint$1.onMessage(WebSocketEndPoint.java:101) at org.zkoss.zkmax.au.websocket.WebSocketEndPoint$1.onMessage(WebSocketEndPoint.java:98) at org.eclipse.jetty.websocket.jsr356.messages.TextWholeMessage.messageComplete(TextWholeMessage.java:56) at org.eclipse.jetty.websocket.jsr356.endpoints.JsrEndpointEventDriver.onTextFrame(JsrEndpointEventDriver.java:218) at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.incomingFrame(AbstractEventDriver.java:162) at org.eclipse.jetty.websocket.common.WebSocketSession.incomingFrame(WebSocketSession.java:375) at org.eclipse.jetty.websocket.common.extensions.AbstractExtension.nextIncomingFrame(AbstractExtension.java:182) at org.eclipse.jetty.websocket.common.extensions.compress.PerMessageDeflateExtension.nextIncomingFrame(PerMessageDeflateExtension.java:105) at org.eclipse.jetty.websocket.common.extensions.compress.CompressExtension.forwardIncoming(CompressExtension.java:142) at org.eclipse.jetty.websocket.common.extensions.compress.PerMessageDeflateExtension.incomingFrame(PerMessageDeflateExtension.java:85) at org.eclipse.jetty.websocket.common.extensions.ExtensionStack.incomingFrame(ExtensionStack.java:220) at org.eclipse.jetty.websocket.common.Parser.notifyFrame(Parser.java:220) at org.eclipse.jetty.websocket.common.Parser.parse(Parser.java:256) at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.readParse(AbstractWebSocketConnection.java:679) at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:511) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128) at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:673) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:591) at java.lang.Thread.run(Thread.java:748)
Expected Result
no exception ...
Debug Info
https://www.zkoss.org/wiki/ZK_Component_Reference/Essential_Components/Include#Defer
in a websocket setup going through the RequestDispatcher maybe is an invalid scenario and defer mode needs to be reconsidered for this use-case
- is duplicated by
-
ZK-3756 Error: websocket + include mode="defer"
- Closed