When I attempt to upload a document using a form, I get the following error :
org.apache.commons.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. /temp/upload_37a45ff5_18dcebe4760__7ff4_00000073.tmp (No such file or directory)
It's failing on ServletFileUpload.parseRequest(request) but the stacktrace gives no other information. This seems to only happen for files larger than about 100kB.
The directory exists and is readable and writeable and there is plenty of disk space available. I have tried increasing the max file size in server.xml, updated all the necessary web.xml files to match this limit and also updated the connectors maxPostSize in the conf directory - to no effect.
I am using the HTML form submit to send the request over to the server from the client.
This error is also only happening if I run Tomcat 8 on a Mac or a linux based system - if I run it on Windows it all works as expected. I have also tried it by running a fresh install of Tomcat 8.5.78. Lastly, I have also tried updating the commons.fileupload package from 1.2.1 to 1.5 -- all of these changes have no effect on the outcome.
I am completely lost and would appreciate pointers on what I can do, or at least what the best way would be to debug the problem. Thanks!
I managed to fix it, turns out it was an underlying OS issue. By default windows has a directory named temp and so if the file was larger than 100KB, the application would use that temp directory to store the file there and then send it to the server.
However, on a linux based system there is no temp there is only tmp and so the application was never able to store a file over 100KB. I just created that temp directory in root directory of the machine and gave rwx permission to all users and re-ran the application and it all worked