java.lang.NullPointerException

ZK-Tracker | benbai | 5 years ago
  1. 0

    original thread: http://sourceforge.net/tracker/?func=detail&aid=3346492&group_id=152762&atid=785191 While uploading larger files (from around 100 - 150 Megabyte) via standard zk upload mechanism a NullPointerException is thrown in AuUploader line 103. This mostly happens when one uploads a file over the network. The try of reproduction on a local machine failed. 22.06.2011 17:25:06 org.zkoss.zk.au.http.AuUploader handleError:217 SCHWERWIEGEND: Failed to upload >>java.lang.NullPointerException >> at org.zkoss.zk.au.http.AuUploader.service(AuUploader.java:103) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:431) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:471) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) >> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) >> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) >> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) >>... Propably this defect goes into the same direction like this here: https://sourceforge.net/tracker/index.php?func=detail&aid=3313630&group_id=152762&atid=785191 I used the following zuml code and composer in a fresh eclipse project: zuml: <?page title="Auto Generated index.zul"?> <?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit"?> <zk> <window id="picWin" title="Hello World!! (ZK Version: ${desktop.webApp.version})" border="normal" width="100%" apply="upload.UploadComposer"> <button id="upload" label="App-Load File" upload="true,maxsize=${desktop.webApp.configuration.maxUploadSize}" /> <button id="clear" label="Clear" disabled="true"></button> You see: <label id="imgName" value="@{picWin$composer.media.name,load-after='upload.onUpload,clear.onClick'}" /> <vbox id="pics" width="600px" height="300px"> </vbox> </window> </zk> Composer: package upload; import org.zkoss.util.media.Media; import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.event.UploadEvent; import org.zkoss.zk.ui.util.GenericForwardComposer; import org.zkoss.zul.Button; import org.zkoss.zul.Image; import org.zkoss.zul.Messagebox; import org.zkoss.zul.Vbox; public class UploadComposer extends GenericForwardComposer { private static final long serialVersionUID = -7909962998642083404L; private Media media; private final Image image = new Image(); private Vbox picWin$pics; private Button picWin$clear; private final static String PIC_ID = "thisPic"; public Media getMedia() { return media; } public void setMedia(Media med) { this.media = med; } public void onClick$clear() { setMedia(null); picWin$pics.removeChild(picWin$pics.getFellow(PIC_ID)); picWin$clear.setDisabled(true); } public void onUpload$upload(UploadEvent event) throws Throwable { setMedia(event.getMedia()); if (event.getMedia() instanceof org.zkoss.image.Image) { image.setContent((org.zkoss.image.Image) media); image.setId(PIC_ID); final Component first = picWin$pics.getFirstChild(); if (null != first) { picWin$pics.removeChild(first); } image.setParent(picWin$pics); picWin$clear.setDisabled(false); System.out.println("received " + media.getName()); } else { try { Messagebox.show("Not an image: " + media, "Error", Messagebox.OK, Messagebox.ERROR); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } }

    ZK-Tracker | 5 years ago | benbai
    java.lang.NullPointerException
  2. 0

    original thread: http://sourceforge.net/tracker/?func=detail&aid=3346492&group_id=152762&atid=785191 While uploading larger files (from around 100 - 150 Megabyte) via standard zk upload mechanism a NullPointerException is thrown in AuUploader line 103. This mostly happens when one uploads a file over the network. The try of reproduction on a local machine failed. 22.06.2011 17:25:06 org.zkoss.zk.au.http.AuUploader handleError:217 SCHWERWIEGEND: Failed to upload >>java.lang.NullPointerException >> at org.zkoss.zk.au.http.AuUploader.service(AuUploader.java:103) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:431) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:471) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) >> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) >> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) >> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) >>... Propably this defect goes into the same direction like this here: https://sourceforge.net/tracker/index.php?func=detail&aid=3313630&group_id=152762&atid=785191 I used the following zuml code and composer in a fresh eclipse project: zuml: <?page title="Auto Generated index.zul"?> <?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit"?> <zk> <window id="picWin" title="Hello World!! (ZK Version: ${desktop.webApp.version})" border="normal" width="100%" apply="upload.UploadComposer"> <button id="upload" label="App-Load File" upload="true,maxsize=${desktop.webApp.configuration.maxUploadSize}" /> <button id="clear" label="Clear" disabled="true"></button> You see: <label id="imgName" value="@{picWin$composer.media.name,load-after='upload.onUpload,clear.onClick'}" /> <vbox id="pics" width="600px" height="300px"> </vbox> </window> </zk> Composer: package upload; import org.zkoss.util.media.Media; import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.event.UploadEvent; import org.zkoss.zk.ui.util.GenericForwardComposer; import org.zkoss.zul.Button; import org.zkoss.zul.Image; import org.zkoss.zul.Messagebox; import org.zkoss.zul.Vbox; public class UploadComposer extends GenericForwardComposer { private static final long serialVersionUID = -7909962998642083404L; private Media media; private final Image image = new Image(); private Vbox picWin$pics; private Button picWin$clear; private final static String PIC_ID = "thisPic"; public Media getMedia() { return media; } public void setMedia(Media med) { this.media = med; } public void onClick$clear() { setMedia(null); picWin$pics.removeChild(picWin$pics.getFellow(PIC_ID)); picWin$clear.setDisabled(true); } public void onUpload$upload(UploadEvent event) throws Throwable { setMedia(event.getMedia()); if (event.getMedia() instanceof org.zkoss.image.Image) { image.setContent((org.zkoss.image.Image) media); image.setId(PIC_ID); final Component first = picWin$pics.getFirstChild(); if (null != first) { picWin$pics.removeChild(first); } image.setParent(picWin$pics); picWin$clear.setDisabled(false); System.out.println("received " + media.getName()); } else { try { Messagebox.show("Not an image: " + media, "Error", Messagebox.OK, Messagebox.ERROR); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } }

    ZK-Tracker | 5 years ago | benbai
    java.lang.NullPointerException
  3. 0

    I am getting quite a lot of these errors in my Tomcat log: 19.12.2012 22:50:36 org.zkoss.zk.ui.impl.UiEngineImpl handleError:1352 SEVERE: >>java.lang.NullPointerException >> at org.zkoss.zk.ui.event.VisibilityChangeEvent.getVisibilityChangeEvent(VisibilityChangeEvent.java:61) >> at org.zkoss.zk.ui.impl.DesktopImpl.service(DesktopImpl.java:713) >> at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1194) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:583) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:481) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:489) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) >> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) >> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) >> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) >> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) >> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) >> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) >> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) >> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) >> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) >> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) >> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) >> at java.lang.Thread.run(Thread.java:619) Seems like random pages and random users. One confirmed error was get by an user using Opera, screenshot attached

    ZK-Tracker | 4 years ago | siimkask
    java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    I am getting quite a lot of these errors in my Tomcat log: 19.12.2012 22:50:36 org.zkoss.zk.ui.impl.UiEngineImpl handleError:1352 SEVERE: >>java.lang.NullPointerException >> at org.zkoss.zk.ui.event.VisibilityChangeEvent.getVisibilityChangeEvent(VisibilityChangeEvent.java:61) >> at org.zkoss.zk.ui.impl.DesktopImpl.service(DesktopImpl.java:713) >> at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1194) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:583) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:481) >> at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:489) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) >> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) >> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) >> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) >> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) >> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) >> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) >> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) >> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) >> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) >> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) >> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) >> at java.lang.Thread.run(Thread.java:619) Seems like random pages and random users. One confirmed error was get by an user using Opera, screenshot attached

    ZK-Tracker | 4 years ago | siimkask
    java.lang.NullPointerException
  6. 0

    Android: Saving Map State in Google map

    Stack Overflow | 11 months ago | Junie Negentien
    java.lang.RuntimeException: Unable to resume activity {com.ourThesis.junieNegentien2015/com.ourThesis.junieNegentien2015.MainActivity}: java.lang.NullPointerException

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at org.zkoss.zk.au.http.AuUploader.service()
    2. ZK Kernel
      DHtmlUpdateServlet.doPost
      1. org.zkoss.zk.au.http.AuUploader.service(AuUploader.java:103)
      2. org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:431)
      3. org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:471)
      3 frames
    3. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      2 frames
    4. Glassfish Core
      StandardWrapperValve.invoke
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      3 frames