[arquillian-issues] [JBoss JIRA] Created: (ARQ-428) EOFException on Websphere

Yves Langisch (JIRA) jira-events at lists.jboss.org
Wed Apr 27 13:31:46 EDT 2011


EOFException on Websphere
-------------------------

                 Key: ARQ-428
                 URL: https://issues.jboss.org/browse/ARQ-428
             Project: Arquillian
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: Base Implementation
    Affects Versions: 1.0.0.Alpha5
            Reporter: Yves Langisch


When running tests on a Websphere container (with the WAS module) I often get EOFExceptions on the client side (especially when the test fails). After some debugging on both sides I noticed that whenever I get the EOFException the ObjectInputStream seems to be empty. That's why it fails to read the magic number which is the first unmarshalling action for the TestResult on the client side. So the problem seems to be on the server side. 

I think that the issue is in the writeObject method of the ServletTestRunner class. According to the API doc (http://download.oracle.com/javaee/5/api/javax/servlet/http/HttpServletResponse.html) HttpServletRespone#setStatus may clear the buffer. The marshalling action (writeObject) is done before setting the http status code so (depending on the state of the container buffer) the buffer with the marshalled TestResult may be cleared. That leads to an empty response.

Setting the status code before marshalling the object resolved the issue for me.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the arquillian-issues mailing list