Problem Using Jakarta_Commons_FileUpload Package (java.lang.IllegalMonitorStateException: current thread not owner ...
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   533422_1234555
Posted On:   Friday, April 16, 2004 12:11 PM

I am trying to use the demo in the package documentation. Here's the code in the servlet. FileUpload upload = new FileUpload(); upload.setSizeMax(-1); upload.setRepositoryPath("/tmp"); List fileItems = upload.parseRequest(request); Once it get to this line, I got following error -------------------------------------------------- java.lang.IllegalMonitorStateException: current thread not owner at org.apache.commons.fileupload.DefaultFileItem.getTempFile(DefaultFileItem.java:617) at org.apache.commons.fileupload.DefaultFileItem.getOutputStream(DefaultFileItem.java:557) at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java, Compiled Code)    More>>

I am trying to use the demo in the package documentation. Here's the code in the servlet.

FileUpload upload = new FileUpload();
upload.setSizeMax(-1);
upload.setRepositoryPath("/tmp");
List fileItems = upload.parseRequest(request);

Once it get to this line, I got following error
--------------------------------------------------
java.lang.IllegalMonitorStateException: current thread not owner
at org.apache.commons.fileupload.DefaultFileItem.getTempFile(DefaultFileItem.java:617)
at org.apache.commons.fileupload.DefaultFileItem.getOutputStream(DefaultFileItem.java:557)
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java, Compiled Code)
at test.HogeSrv.doPost(HogeSrv.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:115)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:83)
at com.caucho.server.http.Invocation.service(Invocation.java, Compiled Code)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:121)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:238)
at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java, Compiled Code)
at com.caucho.server.TcpConnection.run(TcpConnection.java, Compiled Code)
at java.lang.Thread.run(Thread.java:479)

   <<Less
About | Sitemap | Contact