XMLWordPrintable

    • Hide

      Requirements:
      One folder with with subfolder "overlay-content"
      Example: /home/user/test/overlay-content/

      1. Open overlay.war and in WEB-INF/jboss-web.xml file set "overlay-content" folder path as value of <overlay> tag.
        Example: <overlay>/home/user/test/overlay-content</overlay>
      2. Start EAP
      3. Deploy edited overlay.war
      4. Run jar archive.
        Jar archive required one argument. Path to "overlay-content" parent folder.
        Example: java -jar overlay-reproduce.jar /home/user/test/
        After first run, reproducer should end with:

        ...OK...
        ...OK...
        ...ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 28; received: 14

      5. run jar archive again, reproducer should end with:

        ...ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 28; received: 14...
        ...ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 28; received: 14...
        ...ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 28; received: 14...

        And this result of step 5 will now repeat every time, you will run jar archive.

      If you redeploy war(undeploy + deploy), it will repeated from step 4.

      Show
      Requirements : One folder with with subfolder "overlay-content" Example: /home/user/test/overlay-content/ Open overlay.war and in WEB-INF/jboss-web.xml file set "overlay-content" folder path as value of <overlay> tag. Example: <overlay>/home/user/test/overlay-content</overlay> Start EAP Deploy edited overlay.war Run jar archive. Jar archive required one argument. Path to "overlay-content" parent folder. Example: java -jar overlay-reproduce.jar /home/user/test/ After first run, reproducer should end with: ...OK... ...OK... ...ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 28; received: 14 run jar archive again, reproducer should end with: ...ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 28; received: 14... ...ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 28; received: 14... ...ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 28; received: 14... And this result of step 5 will now repeat every time, you will run jar archive. If you redeploy war(undeploy + deploy), it will repeated from step 4.

      If we overlay deployment content, everything works fine. But if we overlay the same content one more time, we get an exception during loading html response entity:

      org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 28; received: 14
      at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:178)
      at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:135)
      at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
      at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
      at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
      at java.io.InputStreamReader.read(InputStreamReader.java:184)
      at java.io.Reader.read(Reader.java:140)
      at org.apache.http.util.EntityUtils.toString(EntityUtils.java:225)
      at org.apache.http.util.EntityUtils.toString(EntityUtils.java:306)
      at org.jboss.qa.management.OverlayReproducer.retrieveAndCheck(OverlayReproducer.java:95)

      Easy to reproduce. Reproducer in attachment. See steps to reproduce section.

      I have to mention weird behavior.

      Reproducer is created on the basis of our integration test. If I run reproducer on my local machine(manual launch of EAP), it behaves as I describe it above.
      But If I run integration test with arquillian(arqullian started EAP and another method deploy war with deployer), this test end succesfully. But If I run the two same tests(same tests with diff names, undeploy+deploy actions between tests) in a row, second one will failed due to incorrect response entity content:

      Expected :modified value some new
      Actual :modified value

      In the context of reproduction, it is equals test of response entity content with expected value after second overlay.

      Attachment section contains:

      • deployment war file,
      • jar archive(reproducer, tested on more machines, should works),
      • reproducer maven project(in case you want see, how reproducer looks like)

        1. 8.0.0.GA.CR1_jdk=oracle-java-11,label_exp=RHEL8&&dynamic&&xlarge.log
          69.21 MB
          Ivan Straka
        2. 8.0.0.GA.CR1_jdk=oracle-java-17,label_exp=RHEL9&&dynamic&&xlarge.log
          69.28 MB
          Ivan Straka
        3. overlay.war
          0.7 kB
          Kamil Triscik

              sdouglas1@redhat.com Stuart Douglas (Inactive)
              ktriscik@redhat.com Kamil Triscik (Inactive)
              Jan Stourac Jan Stourac
              Jan Stourac Jan Stourac
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: