Vaadin upload works on localhost, but fails on server

Please provide answers at
http://stackoverflow.com/questions/29131576/vaadin-upload-works-on-localhost-but-fails-on-server

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.

java.io.IOException: The multipart stream ended unexpectedly
        at com.vaadin.server.communication.FileUploadHandler.readLine(FileUploadHandler.java:302)
        at com.vaadin.server.communication.FileUploadHandler.doHandleSimpleMultipartFileUpload(FileUploadHandler.java:360)
        at com.vaadin.server.communication.FileUploadHandler.handleRequest(FileUploadHandler.java:285)
        at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1408)
        at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:350)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
        at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1542)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
        at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
        at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
        ...

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?