Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004051 [Resin] major always 05-26-10 07:17 05-03-10 12:37
Reporter subwiz View Status public  
Assigned To
Priority normal Resolution fixed  
Status closed   Product Version 4.0.7
Summary 0004051: Servlet 3.0 Upload API throws NPE
Description When using Servlet 3.0 API for file upload, I get the following NPE:

<snip>
java.lang.NullPointerException
    at com.caucho.server.http.HttpServletRequestImpl$PartImpl.write(HttpServletRequestImpl.java:2142)
    at org.wiztools.fileupload.ServletIndex.doPost(ServletIndex.java:39)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:158)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:96)
    at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:109)
    at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:183)
    at com.caucho.server.webapp.AccessLogFilterChain.doFilter(AccessLogFilterChain.java:103)
    at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:286)
    at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:789)
    at com.caucho.network.listen.TcpSocketLink.dispatchRequest(TcpSocketLink.java:660)
    at com.caucho.network.listen.TcpSocketLink.handleRequestsImpl(TcpSocketLink.java:624)
    at com.caucho.network.listen.TcpSocketLink.handleRequests(TcpSocketLink.java:575)
    at com.caucho.network.listen.TcpSocketLink$AcceptTask.doTask(TcpSocketLink.java:1183)
    at com.caucho.network.listen.TcpSocketLink$ConnectionReadTask.runThread(TcpSocketLink.java:1118)
    at com.caucho.network.listen.TcpSocketLink$AcceptTask.run(TcpSocketLink.java:1150)
    at com.caucho.util.ThreadPool$PoolThread.runTasks(ThreadPool.java:901)
    at com.caucho.util.ThreadPool$PoolThread.run(ThreadPool.java:866)
</snip>

This happens only when my Servlet has both doGet() and doPost() method. When I write a Multipart Servlet having only doPost() method, this exception is not thrown.

I have created a sample project to test this issue:

http://code.google.com/p/servlet30-file-upload/ [^]

(Maven based JavaEE 6 Web Project)

Only the third upload feature (*With Additional Parameters to Exclusive Servlet*) in this sample application works.
Additional Information
Attached Files

- Relationships

- Notes
(0004623)
alex
05-03-10 12:37

qa/12wn
 

- Issue History
Date Modified Username Field Change
05-26-10 07:17 subwiz New Issue
05-26-10 09:14 subwiz Issue Monitored: subwiz
05-03-10 12:37 alex Status new => closed
05-03-10 12:37 alex Note Added: 0004623
05-03-10 12:37 alex Resolution open => fixed
05-03-10 12:37 alex Fixed in Version  => 4.0.8


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
30 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker