0

Failed to upload java.lang.NullPointerException for normal file size

asked 2019-02-15 22:14:47 +0800

armagan gravatar image armagan
1

updated 2019-02-20 14:22:32 +0800

Hello everyone,

We used ZK 7.0.1 and java 7. Users can upload file on ZK web pages. Our development and test environment OK. But prod environment has following exception;

We checked file size but independent of file size this exception occur each time.

Probably ZK8 fix it. Is ZK8 compatible with Java 7 ? Thanks for help.

2019-02-14 11:33:11,557 ERROR (AuUploader.java:233) - Failed to upload java.lang.NullPointerException

at org.zkoss.zk.au.http.AuUploader.service(AuUploader.java:115) at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:459) at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:494) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125 at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60) at com.i2i.prm.webapp.base.RequestLoggingFilter.doFilter(RequestLoggingFilter.java:36) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60) at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3748) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3714) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2283) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2182) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1499) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:263) at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

delete flag offensive retag edit

3 Answers

Sort by ยป oldest newest most voted
0

answered 2019-02-20 12:56:33 +0800

MDuchemin gravatar image MDuchemin
1346 1 4
ZK Team

Hi Armagan,

Looks like the stacktrace is here but the actual exception message has been lost when pasting. (although I would guess a possible NullPointerException?)

Also, Zk8 is compatible with Java 7.

link publish delete flag offensive edit
0

answered 2019-02-20 14:24:42 +0800

armagan gravatar image armagan
1

Hi MDuchemin,

You're right, i lost when paste. I've been edited.

Thanks for reply.

link publish delete flag offensive edit
0

answered 2019-02-20 15:15:32 +0800

MDuchemin gravatar image MDuchemin
1346 1 4
ZK Team

Hi Armagan,

Thanks for the updated info. Do you have source access for the AuUploader class? (should be available trough maven / in the download page) I'd recommend putting a breakpoint at org.zkoss.zk.au.http.AuUploader.service(AuUploader.java:115) and check for the variable that is returning a null value.

If this is a production / dev scenario, it might be that your prod server is behind a reverse proxy or a gateway which rewrites the requests and removes the wid / sid from the parameter strings. Without those, the uploader wouldn't find the upload id, which could cause a NPE when receiving the file. Not sure without confirming on your side though, so remote debugging is the easiest road to get more info.

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2019-02-15 22:14:47 +0800

Seen: 10 times

Last updated: Feb 20

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More