Vaadin upload works on localhost, but fails on server

Please provide answers at

Will mark this thread depending on the outcome on stackoverflow.

The goal was, to use the Vaadin upload-component. On localhost it just works fine.

I am running the application on a Glassfish 3.1.2 (build 23) and use Vaadin 7.4.1. Also have tried other Glassfish versions except Glassfish 4, as I have a dependency that is not yet ready for Glassfish 4.

The code of the upload component looks like this, might have modified it some times trying to fix the error.

… code omitted as I couldnt get the formatting working here, please see stackoverflow …

Using this on a localhost instance works all fine. But having it deployed to a server (tried multiple servers and multiple port configurations [also opening all]
) makes it return the following error upon hitting the upload-button. The multipart stream ended unexpectedly
        at com.vaadin.server.communication.FileUploadHandler.readLine(
        at com.vaadin.server.communication.FileUploadHandler.doHandleSimpleMultipartFileUpload(
        at com.vaadin.server.communication.FileUploadHandler.handleRequest(
        at com.vaadin.server.VaadinService.handleRequest(
        at com.vaadin.server.VaadinServlet.service(
        at javax.servlet.http.HttpServlet.service(
        at org.apache.catalina.core.StandardWrapper.service(
        at org.apache.catalina.core.StandardWrapperValve.invoke(
        at org.apache.catalina.core.StandardContextValve.invoke(
        at org.apache.catalina.core.StandardPipeline.doInvoke(
        at org.apache.catalina.core.StandardPipeline.invoke(
        at org.apache.catalina.core.StandardHostValve.invoke(
        at org.apache.catalina.connector.CoyoteAdapter.doService(
        at org.apache.catalina.connector.CoyoteAdapter.service(

There is also a Vaadin addon (Easy Uploads) that should make the process easier, but same results for localhost/server.

If it helps these technologies are used in the overall architecture:

List item
Maven 3.2.1
Jenkins 1.602 (currently only used for build, not deploy)
Hibernate (not relevant, as the error occurs before hibernate is used)
MySQL (not relevant, as the error occurs before the database is accessed)
JDK: 1.7

Used server hosts are Amazon AWS and DigitalOcean.

Right now I don’t have anymore clue what could fix this error. Any recommendations? Any further details I can provide?