Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-3744

error when enabling websocket serverpush via au-event

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 8.5.0
    • Freshly, 8.5.0
    • ZK Update Engine
    • Security Level: Jimmy
    • reproduced on jetty 9.4.6.v20170531 and tomcat 8.5.20

    Description

      Steps to Reproduce

      <zk>
        <button label="Enable Server Push" 
          onClick="desktop.enableServerPush(true);"/>
        <button label="Disable Server Push" 
          onClick="desktop.enableServerPush(false);"/>
      </zk>
      

      Clicking the button "Enable..."

      Current Result

      SEVERE: 
      java.lang.IllegalArgumentException: Request cannot be null
      	at javax.servlet.ServletRequestWrapper.<init>(ServletRequestWrapper.java:89)
      	at javax.servlet.http.HttpServletRequestWrapper.<init>(HttpServletRequestWrapper.java:86)
      	at org.zkoss.zkmax.au.websocket.RequestWrapper.<init>(RequestWrapper.java:39)
      	at org.zkoss.zkmax.au.websocket.WebSocketServerPush.setWebSocketConnectionInfos(WebSocketServerPush.java:81)
      	at org.zkoss.zkmax.au.websocket.WebSocketServerPush.start(WebSocketServerPush.java:100)
      	at org.zkoss.zk.ui.impl.DesktopImpl.enableServerPush0(DesktopImpl.java:1527)
      	at org.zkoss.zk.ui.impl.DesktopImpl.enableServerPush(DesktopImpl.java:1470)
      	at org.zkoss.zk.ui.impl.DesktopImpl.enableServerPush(DesktopImpl.java:1455)
      	at org.zkoss.zk.ui.impl.DesktopImpl.enableServerPush(DesktopImpl.java:1451)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      

      Expected Result

      SP enabled for the Desktop - no exception

      Debug Info

      happens on both tomcat and jetty

      Workaround

      enable SP once the page loads (since it's using the same websocket there's no overhead on the network side)

      Attachments

        Activity

          People

            wenninghsu wenninghsu
            cor3000 cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour
                1h