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

Make Warp Java 11 compatible - upgrade Javassist

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Done
    • Major
    • warp_1_next
    • warp_1.0.0.Alpha8
    • Extension - Warp
    • None

    Description

      Warp fails with Java 11. An update of Javassist is needed.

      The "Affects version" is wrong, I use Warp 1.0.0.Final, but it is not in the list.

      Attached zip StatelessMaven.zip contains a full sample with a Warp test. Unzip it and run "mvn verify -Parq-remote" with Java 11. You must have started a WildFly 26 server on your local machine to make it work.

       

      This exception raises:

      org.jboss.arquillian.warp.exception.ClientWarpExecutionException:
      enriching request failed; caused by:
      javassist.NotFoundException: de.hsrm.cs.javaee8.statelessmaven.web.test.WarpIT$1
      Caused by: java.lang.RuntimeException:
      Could not transform and replicate class class java.util.Arrays$ArrayList:
      Unable to transform inspection de.hsrm.cs.javaee8.statelessmaven.web.test.WarpIT$1:
      de.hsrm.cs.javaee8.statelessmaven.web.test.WarpIT$1
      Caused by: org.jboss.arquillian.warp.impl.client.transformation.InspectionTransformationException:
      Unable to transform inspection de.hsrm.cs.javaee8.statelessmaven.web.test.WarpIT$1:
      de.hsrm.cs.javaee8.statelessmaven.web.test.WarpIT$1
      Caused by: javassist.NotFoundException: de.hsrm.cs.javaee8.statelessmaven.web.test.WarpIT$1

       

      My workaround: in "StatelessMaven-web\pom.xml", I added an exclusion to the dependency "org.jboss.arquillian.extension:arquillian-warp-jsf":

              <dependency>
                  <groupId>org.jboss.arquillian.extension</groupId>
                  <artifactId>arquillian-warp-jsf</artifactId>
                  <scope>test</scope>
                  <exclusions>
                      <exclusion>
                          <groupId>javassist</groupId>
                          <artifactId>javassist</artifactId>
                      </exclusion>
                    </exclusions>
              </dependency>

      And I added a new dependency:

            <dependency>
              <groupId>org.javassist</groupId>
              <artifactId>javassist</artifactId>
              <scope>test</scope>
            </dependency>

      No version number is needed, as "org.javassist:javassist" is provided by the WildFly bom. For WildFly 26, this is "3.27.0-GA".

      Now, the test works.

       

      I tested also with other versions of Javassist and Java runtime:

      Different Error with "javassist" 3.23.0-GA

      enriching request failed; caused by:
      java.lang.NullPointerException: null
      Caused by: java.lang.RuntimeException:
      Could not transform and replicate class class java.util.Arrays$ArrayList:
      Unable to convert org.jboss.arquillian.warp.generated.A17873520-46ef-4669-b0df-7b3ee0cd2c11 to class
      Caused by: org.jboss.arquillian.warp.impl.client.transformation.InspectionTransformationException: Unable to convert org.jboss.arquillian.warp.generated.A17873520-46ef-4669-b0df-7b3ee0cd2c11 to class
      Caused by: java.lang.NullPointerException

      It starts working with 3.24.0-GA

      Error with Java 17 (might also be caused by as missing module info in my sample?):
      org.jboss.arquillian.warp.exception.ClientWarpExecutionException:
      enriching request failed; caused by:
      java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @67b92f0a
      Caused by: java.lang.RuntimeException:
      Could not transform and replicate class class java.util.Arrays$ArrayList:
      Unable to convert org.jboss.arquillian.warp.generated.Ab3d4f9c3-8569-4969-8a2a-3a3eade737ef to class
      Caused by: org.jboss.arquillian.warp.impl.client.transformation.InspectionTransformationException: Unable to convert org.jboss.arquillian.warp.generated.Ab3d4f9c3-8569-4969-8a2a-3a3eade737ef to class
      Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @67b92f0a

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            wolfgangknauf Wolfgang Knauf
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: