Note that there are some explanatory texts on larger screens.

plurals
  1. POFile not found exception for temporary files
    primarykey
    data
    text
    <p>I'm building java app (Spring &amp; JSF &amp; PrimeFaces). I upload a file to the server, however, if I click "next" button right after the file upload ends, I get this error:</p> <pre><code>Aug 24, 2013 8:12:34 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet [appServlet] in context with path [/codekata] threw exception [Request processing failed; nested exception is org.springframework.webflow.execution.repository.FlowExecutionRestorationFailureException: A problem occurred restoring the flow execution with key 'e1s3'] with root cause java.io.FileNotFoundException: C:\Users\Luke\AppData\Local\Temp\upload__6f71235a_140b1bdd246__8000_00000011.tmp (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.&lt;init&gt;(FileInputStream.java:138) at org.apache.commons.fileupload.disk.DiskFileItem.readObject(DiskFileItem.java:709) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1004) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1891) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1796) java.lang.Thread.run(Thread.java:722) </code></pre> <p>If I wait a couple of seconds, all works fine. I assume that the upload file needs to have time to copy itself to the temporary folder, does anyone have an idea how to resolve this problem. I use Tomcat 7.</p> <p>Here is my download method:</p> <pre><code>public StreamedContent getDownloadFile() { InputStream inputStream = new ByteArrayInputStream(selectedBook.getBookText().getText().getBytes()); return new DefaultStreamedContent(inputStream, "text/plain", selectedBook.getTitle() + ".txt", BookBean.encoding); } </code></pre> <p>Thanks, Luke.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload