Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-2769

BlacklistedMediaTypeTest (bootable JAR) deployment fails when executed against WildFly 21

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 3.14.0.Final
    • 3.13.2.Final
    • None
    • None
    • Hide

      1. clone https://github.com/resteasy/Resteasy/tree/3.14

      2. build RESTEasy using a local cache, e.g. -Dmaven.repo.local=/home/test-release-maven-repo:

      $ mvn install -Dmaven.test.skip=true -Dmaven.repo.local=/home/test-release-repo
      

      3. cd to testsuite directory:

      cd testsuite
      

      4. run the bootable JAR execution for the test against WildFly 21 Final:

      $ mvn clean verify -am -pl integration-tests -Dmaven.repo.local=/home/fburzigo/projects/git/resteasy/Resteasy/local-repo-3.14 -Dserver.version=21.0.0.Final -Ddisable.microprofile.tests -Dserver.home=foo -Dts.bootable -Dtestsuite.wildfly.galleon.pack.group.id=org.wildfly -Dversion.org.wildfly.jar.plugin=2.0.2.Final -Dtest=org.jboss.resteasy.test.providers.mediatype.BlacklistedMediaTypeTest
      

      The test should fail with the following stack trace:

      org.jboss.resteasy.test.providers.mediatype.BlacklistedMediaTypeTest Time elapsed: 0.006 sec <<< ERROR!
      org.jboss.arquillian.container.spi.client.container.DeploymentException: 
      Cannot deploy BlacklistedMediaTypeTest.war: {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => {"WFLYCTL0080: Failed services" => {"jboss.module.service.\"deployment.BlacklistedMediaTypeTest.war\".main" => "WFLYSRV0179: Failed to load module: deployment.BlacklistedMediaTypeTest.war
       Caused by: org.jboss.modules.ModuleNotFoundException: org.bouncycastle"}}}}
      ... 
      

      Please notice that the test doesn't fail when executed against the standard WildFly 21 Final distribution:

      $ mvn clean verify -am -pl integration-tests -Dmaven.repo.local=/home/fburzigo/projects/git/resteasy/Resteasy/local-repo-3.14 -Dserver.version=21.0.0.Final -Dtest=org.jboss.resteasy.test.providers.mediatype.BlacklistedMediaTypeTest
      

      Here the test should pass:

      -------------------------------------------------------
       T E S T S
      -------------------------------------------------------
      ...
      Running org.jboss.resteasy.test.providers.mediatype.BlacklistedMediaTypeTest
      Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.068 sec - in org.jboss.resteasy.test.providers.mediatype.BlacklistedMediaTypeTest
      
      Results :
      
      Tests run: 9, Failures: 0, Errors: 0, Skipped: 0
      ... 
      

      Please notice that the same behavior occurs when testing WildFly 20. You'd need to remove the ejb and mail layers from the Feature Pack configuration in testsuite/integration-tests/pom.xml and run the above mentioned test case for it to work.
      WildFly 20 is mentioned here because it is the default value to which the 3.14 testsuite POM is set to depend on for running WildFly integration tests. 

      Show
      1. clone  https://github.com/resteasy/Resteasy/tree/3.14 2. build RESTEasy using a local cache, e.g. -Dmaven.repo.local=/home/test-release-maven-repo: $ mvn install -Dmaven.test.skip= true -Dmaven.repo.local=/home/test-release-repo 3. cd to testsuite directory: cd testsuite 4. run the bootable JAR execution for the test against WildFly 21 Final: $ mvn clean verify -am -pl integration-tests -Dmaven.repo.local=/home/fburzigo/projects/git/resteasy/Resteasy/local-repo-3.14 -Dserver.version=21.0.0.Final -Ddisable.microprofile.tests -Dserver.home=foo -Dts.bootable -Dtestsuite.wildfly.galleon.pack.group.id=org.wildfly -Dversion.org.wildfly.jar.plugin=2.0.2.Final -Dtest=org.jboss.resteasy.test.providers.mediatype.BlacklistedMediaTypeTest The test should  fail  with the following stack trace: org.jboss.resteasy.test.providers.mediatype.BlacklistedMediaTypeTest Time elapsed: 0.006 sec <<< ERROR! org.jboss.arquillian.container.spi.client.container.DeploymentException: Cannot deploy BlacklistedMediaTypeTest.war: { "WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => { "Operation step-1" => { "WFLYCTL0080: Failed services" => { "jboss.module.service.\" deployment.BlacklistedMediaTypeTest.war\ ".main" => "WFLYSRV0179: Failed to load module: deployment.BlacklistedMediaTypeTest.war Caused by: org.jboss.modules.ModuleNotFoundException: org.bouncycastle"}}}} ...  Please notice that the test doesn't fail when executed against the standard WildFly 21 Final distribution: $ mvn clean verify -am -pl integration-tests -Dmaven.repo.local=/home/fburzigo/projects/git/resteasy/Resteasy/local-repo-3.14 -Dserver.version=21.0.0.Final -Dtest=org.jboss.resteasy.test.providers.mediatype.BlacklistedMediaTypeTest Here the test should pass: ------------------------------------------------------- T E S T S ------------------------------------------------------- ... Running org.jboss.resteasy.test.providers.mediatype.BlacklistedMediaTypeTest Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.068 sec - in org.jboss.resteasy.test.providers.mediatype.BlacklistedMediaTypeTest Results : Tests run: 9, Failures: 0, Errors: 0, Skipped: 0 ...  Please notice that the same behavior occurs when testing WildFly 20. You'd need to remove the ejb and mail layers from the Feature Pack configuration in testsuite/integration-tests/pom.xml and run the above mentioned test case for it to work. WildFly 20 is mentioned here because it is the default value to which the 3.14 testsuite POM is set to depend on for running WildFly integration tests. 
    • Hide

      Add the following bit (see Required for BC... comment) to the Feature Pack configuration in testsuite/integration-tests/pom.xml:

      ...
                                              <feature-pack>
                                                  <groupId>${testsuite.wildfly.galleon.pack.group.id}</groupId>
                                                  <artifactId>wildfly-galleon-pack</artifactId>
                                                  <version>${server.version}</version>
                                                  <!-- Required for rxjava -->
                                                  <includedPackages>
                                                      <package>org.jboss.resteasy.resteasy-rxjava2</package>
                                                  </includedPackages>
                                                  <!--
                                                      Required for BC - this is needed to resemble what in
                                                      jboss-deployment-structure-bouncycastle.xml.
                                                      That deployment structure is used by some test cases and is expected
                                                      to reflect the server module working configuration.
                                                  -->
                                                  <includedPackages>
                                                      <package>org.bouncycastle</package>
                                                  </includedPackages>
                                              </feature-pack>
      

      Alternatively, skip the BlacklistedMediaTypeTest test case when running bootable JAR integration tests.

      Show
      Add the following bit (see Required for BC... comment) to the Feature Pack configuration in testsuite/integration-tests/pom.xml: ... <feature-pack> <groupId>${testsuite.wildfly.galleon.pack.group.id}</groupId> <artifactId>wildfly-galleon-pack</artifactId> <version>${server.version}</version> <!-- Required for rxjava --> <includedPackages> < package >org.jboss.resteasy.resteasy-rxjava2</ package > </includedPackages> <!-- Required for BC - this is needed to resemble what in jboss-deployment-structure-bouncycastle.xml. That deployment structure is used by some test cases and is expected to reflect the server module working configuration. --> <includedPackages> < package >org.bouncycastle</ package > </includedPackages> </feature-pack> Alternatively, skip the BlacklistedMediaTypeTest test case when running bootable JAR integration tests.
    • Undefined

      This affects executions against WildFly 21 Final, which at the moment depends on RESTEasy 3.13.2.Final.
      Given that the next version to be used should be 3.14 the fix should target that branch, otherwise if `3.13` is going to be kept it will need to be back ported there.
      In WildFly 21 he Bouncycastle module definition has just org.bouncycastle which is reflected by: https://github.com/resteasy/Resteasy/blob/3.14/testsuite/integration-tests/src/test/resources/jboss-deployment-structure-bouncycastle.xml
      The mentioned deployment structure is then used by the test: https://github.com/resteasy/Resteasy/blob/3.14/testsuite/integration-tests/src/test/java/org/jboss/resteasy/test/providers/mediatype/BlacklistedMediaTypeTest.java#L85
      which is passing when executed a standard WildFly 21 distribution and instead is failing when executed against the same version provisioned by Galleon.
      Here (and following comments) is where this behavior is detailed: https://issues.redhat.com/browse/WFLY-14065?focusedCommentId=15425523&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-15425523
       

              fburzigo Fabio Burzigotti
              fburzigo Fabio Burzigotti
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: