Uploaded image for project: 'Arquillian'
  1. Arquillian
  2. ARQ-428

EOFException on Websphere

    XMLWordPrintable

Details

    Description

      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.

      Attachments

        Activity

          People

            gpoul_jira Gerhard Poul (Inactive)
            ylangisc Yves Langisch (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: