uploading huge file to vaadin fails with 'The multipart stream...'

I’m trying to upload a 9.5TB file using the upload component of Vaadin (maybe not the best choice, but consider it as a stress test), and it immediately (after 60 lines or something) fails with following stacktraces:


com.vaadin.terminal.gwt.server.UploadException: Upload failed
	at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.streamToReceiver(AbstractCommunicationManager.java:626)
	at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleSimpleMultipartFileUpload(AbstractCommunicationManager.java:479)
	at com.vaadin.terminal.gwt.server.CommunicationManager.handleFileUpload(CommunicationManager.java:257)
	at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:495)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:594)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:485)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:412)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
	at org.eclipse.jetty.server.Server.handle(Server.java:351)
	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:451)
	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:931)
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:857)
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:76)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:609)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:45)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
	at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.IOException: The multipart stream ended unexpectedly
	at com.vaadin.terminal.gwt.server.AbstractCommunicationManager$SimpleMultiPartInputStream.read(AbstractCommunicationManager.java:2395)
	at java.io.InputStream.read(InputStream.java:154)
	at java.io.InputStream.read(InputStream.java:85)
	at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.streamToReceiver(AbstractCommunicationManager.java:581)
	... 25 more

you can reproduce this on the Vaadin demo page very easily. Is this something the upload component should be able to handle? If not, what’s the maximum size for the upload component? Are there any alternatives to the upload component that I could use for uploading huge files (ftp being one of them, but are there others that integrate with Vaadin for example)?

Tx,

Kim Marivoet

Don’t know about the exception you got there, but there is actually limits in the whole browser world. With a quick googling on max file sizes for http, it turned out that the server usually has a limit as well a setting to say how big files it can handle on http uploads.
http://stackoverflow.com/questions/461282/what-is-the-maximum-file-size-i-can-transfer-using-http-and-using-ftp

The normal solution in applications that requires uploads of >2GB files, pausing and resuming of uploads or multiple stream upload, is to code a flash application or java applet on top of your existing application.

Bummer. Just when you thought you could finally get rid of Flash and applets… I’ll probably use an ftp server for uploading huge files.

Thanks for the answer,
Kim