org.zkoss.zk.ui.UiException: javax.servlet.ServletException: Unable to encode /zkau/view/z_yol/h5LQh/29f/1/c/a.png

ZK-Tracker | smuellner | 3 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    It looks like the context path was not available and calling length() causes this NPE? org.zkoss.zk.ui.UiException: javax.servlet.ServletException: Unable to encode /zkau/view/z_yol/h5LQh/29f/1/c/a.png at org.zkoss.zk.ui.http.ExecutionImpl.encodeURL(ExecutionImpl.java:328) ~[zk-6.5.5.jar:6.5.5] at org.zkoss.zk.ui.impl.DesktopImpl.getUpdateURI(DesktopImpl.java:406) ~[zk-6.5.5.jar:6.5.5] at org.zkoss.zk.ui.impl.DesktopImpl.getDynamicMediaURI(DesktopImpl.java:421) ~[zk-6.5.5.jar:6.5.5] at org.zkoss.zul.impl.Utils.getDynamicMediaURI(Utils.java:181) ~[zul-6.5.5.jar:6.5.5] at org.zkoss.zul.Image.getEncodedURL(Image.java:230) ~[zul-6.5.5.jar:6.5.5] at org.zkoss.zul.Image.renderProperties(Image.java:319) ~[zul-6.5.5.jar:6.5.5] at org.zkoss.zk.ui.AbstractComponent.redraw(AbstractComponent.java:1807) ~[zk-6.5.5.jar:6.5.5] at org.zkoss.zk.ui.AbstractComponent.redrawChildren(AbstractComponent.java:1884) ~[zk-6.5.5.jar:6.5.5] at org.zkoss.zk.ui.AbstractComponent.redraw(AbstractComponent.java:1826) ~[zk-6.5.5.jar:6.5.5] at org.zkoss.zk.ui.AbstractComponent.redrawChildren(AbstractComponent.java:1884) ~[zk-6.5.5.jar:6.5.5] at org.zkoss.zk.ui.AbstractComponent.redraw(AbstractComponent.java:1826) ~[zk-6.5.5.jar:6.5.5] at org.zkoss.zk.ui.AbstractComponent.redrawChildren(AbstractComponent.java:1884) ~[zk-6.5.5.jar:6.5.5] at org.zkoss.zk.ui.AbstractComponent.redraw(AbstractComponent.java:1826) ~[zk-6.5.5.jar:6.5.5] at org.zkoss.zk.ui.AbstractComponent.redrawChildren(AbstractComponent.java:1884) ~[zk-6.5.5.jar:6.5.5] at org.zkoss.zk.ui.AbstractComponent.redraw(AbstractComponent.java:1826) ~[zk-6.5.5.jar:6.5.5] at org.zkoss.zk.ui.impl.UiVisualizer.redraw(UiVisualizer.java:978) ~[zk-6.5.5.jar:6.5.5] at org.zkoss.zk.ui.impl.UiVisualizer.getResponses(UiVisualizer.java:675) ~[zk-6.5.5.jar:6.5.5] at org.zkoss.zk.ui.impl.UiEngineImpl.getResponses(UiEngineImpl.java:1420) [zk-6.5.5.jar:6.5.5] at org.zkoss.zk.ui.impl.UiEngineImpl.endUpdate(UiEngineImpl.java:1126) [zk-6.5.5.jar:6.5.5] at org.zkoss.zkex.ui.comet.CometServerPush.deactivate(CometServerPush.java:419) ~[zkex-6.5.5.jar:na] at org.zkoss.zk.ui.impl.DesktopImpl.deactivateServerPush(DesktopImpl.java:1502) ~[zk-6.5.5.jar:6.5.5] at org.zkoss.zk.ui.Executions.deactivate(Executions.java:980) ~[zk-6.5.5.jar:6.5.5] Caused by: javax.servlet.ServletException: Unable to encode /zkau/view/z_yol/h5LQh/29f/1/c/a.png at org.zkoss.web.servlet.http.Encodes.encodeURL(Encodes.java:405) ~[zweb-6.5.5.jar:6.5.5] at org.zkoss.zk.ui.http.ExecutionImpl.encodeURL(ExecutionImpl.java:326) ~[zk-6.5.5.jar:6.5.5] ... 31 common frames omitted Caused by: java.lang.NullPointerException: null at org.zkoss.web.servlet.http.Encodes.encodeURL0(Encodes.java:494) ~[zweb-6.5.5.jar:6.5.5] at org.zkoss.web.servlet.http.Encodes.access$000(Encodes.java:47) ~[zweb-6.5.5.jar:6.5.5] at org.zkoss.web.servlet.http.Encodes$1.encodeURL(Encodes.java:429) ~[zweb-6.5.5.jar:6.5.5] at org.zkoss.web.servlet.http.Encodes.encodeURL(Encodes.java:402) ~[zweb-6.5.5.jar:6.5.5] ... 32 common frames omitted

    ZK-Tracker | 3 years ago | smuellner
    org.zkoss.zk.ui.UiException: javax.servlet.ServletException: Unable to encode /zkau/view/z_yol/h5LQh/29f/1/c/a.png
  2. 0

    It looks like the context path was not available and calling length() causes this NPE? org.zkoss.zk.ui.UiException: javax.servlet.ServletException: Unable to encode /zkau/view/z_yol/h5LQh/29f/1/c/a.png at org.zkoss.zk.ui.http.ExecutionImpl.encodeURL(ExecutionImpl.java:328) ~[zk-6.5.5.jar:6.5.5] at org.zkoss.zk.ui.impl.DesktopImpl.getUpdateURI(DesktopImpl.java:406) ~[zk-6.5.5.jar:6.5.5] at org.zkoss.zk.ui.impl.DesktopImpl.getDynamicMediaURI(DesktopImpl.java:421) ~[zk-6.5.5.jar:6.5.5] at org.zkoss.zul.impl.Utils.getDynamicMediaURI(Utils.java:181) ~[zul-6.5.5.jar:6.5.5] at org.zkoss.zul.Image.getEncodedURL(Image.java:230) ~[zul-6.5.5.jar:6.5.5] at org.zkoss.zul.Image.renderProperties(Image.java:319) ~[zul-6.5.5.jar:6.5.5] at org.zkoss.zk.ui.AbstractComponent.redraw(AbstractComponent.java:1807) ~[zk-6.5.5.jar:6.5.5] at org.zkoss.zk.ui.AbstractComponent.redrawChildren(AbstractComponent.java:1884) ~[zk-6.5.5.jar:6.5.5] at org.zkoss.zk.ui.AbstractComponent.redraw(AbstractComponent.java:1826) ~[zk-6.5.5.jar:6.5.5] at org.zkoss.zk.ui.AbstractComponent.redrawChildren(AbstractComponent.java:1884) ~[zk-6.5.5.jar:6.5.5] at org.zkoss.zk.ui.AbstractComponent.redraw(AbstractComponent.java:1826) ~[zk-6.5.5.jar:6.5.5] at org.zkoss.zk.ui.AbstractComponent.redrawChildren(AbstractComponent.java:1884) ~[zk-6.5.5.jar:6.5.5] at org.zkoss.zk.ui.AbstractComponent.redraw(AbstractComponent.java:1826) ~[zk-6.5.5.jar:6.5.5] at org.zkoss.zk.ui.AbstractComponent.redrawChildren(AbstractComponent.java:1884) ~[zk-6.5.5.jar:6.5.5] at org.zkoss.zk.ui.AbstractComponent.redraw(AbstractComponent.java:1826) ~[zk-6.5.5.jar:6.5.5] at org.zkoss.zk.ui.impl.UiVisualizer.redraw(UiVisualizer.java:978) ~[zk-6.5.5.jar:6.5.5] at org.zkoss.zk.ui.impl.UiVisualizer.getResponses(UiVisualizer.java:675) ~[zk-6.5.5.jar:6.5.5] at org.zkoss.zk.ui.impl.UiEngineImpl.getResponses(UiEngineImpl.java:1420) [zk-6.5.5.jar:6.5.5] at org.zkoss.zk.ui.impl.UiEngineImpl.endUpdate(UiEngineImpl.java:1126) [zk-6.5.5.jar:6.5.5] at org.zkoss.zkex.ui.comet.CometServerPush.deactivate(CometServerPush.java:419) ~[zkex-6.5.5.jar:na] at org.zkoss.zk.ui.impl.DesktopImpl.deactivateServerPush(DesktopImpl.java:1502) ~[zk-6.5.5.jar:6.5.5] at org.zkoss.zk.ui.Executions.deactivate(Executions.java:980) ~[zk-6.5.5.jar:6.5.5] Caused by: javax.servlet.ServletException: Unable to encode /zkau/view/z_yol/h5LQh/29f/1/c/a.png at org.zkoss.web.servlet.http.Encodes.encodeURL(Encodes.java:405) ~[zweb-6.5.5.jar:6.5.5] at org.zkoss.zk.ui.http.ExecutionImpl.encodeURL(ExecutionImpl.java:326) ~[zk-6.5.5.jar:6.5.5] ... 31 common frames omitted Caused by: java.lang.NullPointerException: null at org.zkoss.web.servlet.http.Encodes.encodeURL0(Encodes.java:494) ~[zweb-6.5.5.jar:6.5.5] at org.zkoss.web.servlet.http.Encodes.access$000(Encodes.java:47) ~[zweb-6.5.5.jar:6.5.5] at org.zkoss.web.servlet.http.Encodes$1.encodeURL(Encodes.java:429) ~[zweb-6.5.5.jar:6.5.5] at org.zkoss.web.servlet.http.Encodes.encodeURL(Encodes.java:402) ~[zweb-6.5.5.jar:6.5.5] ... 32 common frames omitted

    ZK-Tracker | 3 years ago | smuellner
    org.zkoss.zk.ui.UiException: javax.servlet.ServletException: Unable to encode /zkau/view/z_yol/h5LQh/29f/1/c/a.png

    Root Cause Analysis

    1. java.lang.NullPointerException

      null

      at org.zkoss.web.servlet.http.Encodes.encodeURL0()
    2. The ZKoss Web Library
      Encodes.encodeURL
      1. org.zkoss.web.servlet.http.Encodes.encodeURL0(Encodes.java:494)[zweb-6.5.5.jar:6.5.5]
      2. org.zkoss.web.servlet.http.Encodes.access$000(Encodes.java:47)[zweb-6.5.5.jar:6.5.5]
      3. org.zkoss.web.servlet.http.Encodes$1.encodeURL(Encodes.java:429)[zweb-6.5.5.jar:6.5.5]
      4. org.zkoss.web.servlet.http.Encodes.encodeURL(Encodes.java:402)[zweb-6.5.5.jar:6.5.5]
      5. org.zkoss.web.servlet.http.Encodes.encodeURL(Encodes.java:405)[zweb-6.5.5.jar:6.5.5]
      5 frames
    3. ZK Kernel
      DesktopImpl.getDynamicMediaURI
      1. org.zkoss.zk.ui.http.ExecutionImpl.encodeURL(ExecutionImpl.java:326)[zk-6.5.5.jar:6.5.5]
      2. org.zkoss.zk.ui.http.ExecutionImpl.encodeURL(ExecutionImpl.java:328)[zk-6.5.5.jar:6.5.5]
      3. org.zkoss.zk.ui.impl.DesktopImpl.getUpdateURI(DesktopImpl.java:406)[zk-6.5.5.jar:6.5.5]
      4. org.zkoss.zk.ui.impl.DesktopImpl.getDynamicMediaURI(DesktopImpl.java:421)[zk-6.5.5.jar:6.5.5]
      4 frames
    4. ZK XUL Components
      Image.renderProperties
      1. org.zkoss.zul.impl.Utils.getDynamicMediaURI(Utils.java:181)[zul-6.5.5.jar:6.5.5]
      2. org.zkoss.zul.Image.getEncodedURL(Image.java:230)[zul-6.5.5.jar:6.5.5]
      3. org.zkoss.zul.Image.renderProperties(Image.java:319)[zul-6.5.5.jar:6.5.5]
      3 frames
    5. ZK Kernel
      UiEngineImpl.endUpdate
      1. org.zkoss.zk.ui.AbstractComponent.redraw(AbstractComponent.java:1807)[zk-6.5.5.jar:6.5.5]
      2. org.zkoss.zk.ui.AbstractComponent.redrawChildren(AbstractComponent.java:1884)[zk-6.5.5.jar:6.5.5]
      3. org.zkoss.zk.ui.AbstractComponent.redraw(AbstractComponent.java:1826)[zk-6.5.5.jar:6.5.5]
      4. org.zkoss.zk.ui.AbstractComponent.redrawChildren(AbstractComponent.java:1884)[zk-6.5.5.jar:6.5.5]
      5. org.zkoss.zk.ui.AbstractComponent.redraw(AbstractComponent.java:1826)[zk-6.5.5.jar:6.5.5]
      6. org.zkoss.zk.ui.AbstractComponent.redrawChildren(AbstractComponent.java:1884)[zk-6.5.5.jar:6.5.5]
      7. org.zkoss.zk.ui.AbstractComponent.redraw(AbstractComponent.java:1826)[zk-6.5.5.jar:6.5.5]
      8. org.zkoss.zk.ui.AbstractComponent.redrawChildren(AbstractComponent.java:1884)[zk-6.5.5.jar:6.5.5]
      9. org.zkoss.zk.ui.AbstractComponent.redraw(AbstractComponent.java:1826)[zk-6.5.5.jar:6.5.5]
      10. org.zkoss.zk.ui.impl.UiVisualizer.redraw(UiVisualizer.java:978)[zk-6.5.5.jar:6.5.5]
      11. org.zkoss.zk.ui.impl.UiVisualizer.getResponses(UiVisualizer.java:675)[zk-6.5.5.jar:6.5.5]
      12. org.zkoss.zk.ui.impl.UiEngineImpl.getResponses(UiEngineImpl.java:1420)[zk-6.5.5.jar:6.5.5]
      13. org.zkoss.zk.ui.impl.UiEngineImpl.endUpdate(UiEngineImpl.java:1126)[zk-6.5.5.jar:6.5.5]
      13 frames
    6. org.zkoss.zkex
      CometServerPush.deactivate
      1. org.zkoss.zkex.ui.comet.CometServerPush.deactivate(CometServerPush.java:419)[zkex-6.5.5.jar:na]
      1 frame
    7. ZK Kernel
      Executions.deactivate
      1. org.zkoss.zk.ui.impl.DesktopImpl.deactivateServerPush(DesktopImpl.java:1502)[zk-6.5.5.jar:6.5.5]
      2. org.zkoss.zk.ui.Executions.deactivate(Executions.java:980)[zk-6.5.5.jar:6.5.5]
      2 frames