Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error deleting file in servlet code after Internet Explorer download error

 
Tom Katz
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Internet Explorer cannot download %FILENAME% from localhost.
The data area passed to a system call is too small.


I get the above error when attempting to download a large file (412MB). Running Jetty 6.1.5.

The real problem is that after getting this error, the code that deletes the temp file is failing. Just a File.delete call, but it works in cases where the file does download. If I try manually deleting the file, I get errors, so I think that's reason to suspect that Internet Explorer may still be accessing the file somehow.

Anyone seen this particular error code when downloading the file?

Also, any ideas on other ways to delete the file in this instance.

thanks,
Tom
 
Tom Katz
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This turned out to be an issue in the file download servlet that was writing to the response stream. It was creating a byte[] that was too large, and generating an OutOfMemoryError.

Once I changed this code to write to the stream in smaller chunks, things work fine.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you for taking the time to post an update
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic