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

Modular java (eg JDK11) doesn't work correctly with RESTEasy client

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.0.0.CR1
    • None
    • None

      Modular java (eg JDK11) doesn't work correctly with resteasy client.

      I prepared two client pom files.

      Java is not able to list modules of these client pom files.


      Lightweight pom file with resteasy-* dependencies only, I prepared this pom based on resteasy TS pom file

      resteasy-client-pom-lightweight.xml

      Steps to reproduce:

      rm -rf target
      mvn -f resteasy-client-pom-lightweight.xml dependency:copy-dependencies
      java -p ./target/dependency/ --list-modules
      rm ./target/dependency/resteasy-jaxrs-services-4.0.0-SNAPSHOT.jar
      java -p ./target/dependency/ --list-modules
      rm ./target/dependency/jboss-annotations-api_1.2_spec-1.0.0.Final.jar
      java -p ./target/dependency/ --list-modules
      rm ./target/dependency/jboss-jaxb-api_2.3_spec-1.0.0.Final.jar
      java -p ./target/dependency/ --list-modules
      rm ./target/dependency/resteasy-validator-provider-11-4.0.0-SNAPSHOT.jar
      java -p ./target/dependency/ --list-modules
      

      Results:

      [mkopecky@localhost single-client]$ jdk10
      [mkopecky@localhost single-client]$ rm -rf target
      [mkopecky@localhost single-client]$ mvn -f resteasy-client-pom-lightweight.xml dependency:copy-dependencies
      ...
      [mkopecky@localhost single-client]$ java -p ./target/dependency/ --list-modules
      Error occurred during initialization of boot layer
      java.lang.module.FindException: Unable to derive module descriptor for ./target/dependency/resteasy-jaxrs-services-4.0.0-SNAPSHOT.jar
      Caused by: java.lang.module.InvalidModuleDescriptorException: Provider class org.jboss.resteasy.spi.ResteasyProviderFactory not in module
      [mkopecky@localhost single-client]$ rm ./target/dependency/resteasy-jaxrs-services-4.0.0-SNAPSHOT.jar
      [mkopecky@localhost single-client]$ java -p ./target/dependency/ --list-modules
      Error occurred during initialization of boot layer
      java.lang.module.FindException: Unable to derive module descriptor for ./target/dependency/jboss-annotations-api_1.2_spec-1.0.0.Final.jar
      Caused by: java.lang.IllegalArgumentException: jboss.annotations.api.1.2.spec: Invalid module name: '1' is not a Java identifier
      [mkopecky@localhost single-client]$ rm ./target/dependency/jboss-annotations-api_1.2_spec-1.0.0.Final.jar
      [mkopecky@localhost single-client]$ java -p ./target/dependency/ --list-modules
      Error occurred during initialization of boot layer
      java.lang.module.FindException: Unable to derive module descriptor for ./target/dependency/jboss-jaxb-api_2.3_spec-1.0.0.Final.jar
      Caused by: java.lang.IllegalArgumentException: jboss.jaxb.api.2.3.spec: Invalid module name: '2' is not a Java identifier
      [mkopecky@localhost single-client]$ rm ./target/dependency/jboss-jaxb-api_2.3_spec-1.0.0.Final.jar
      [mkopecky@localhost single-client]$ java -p ./target/dependency/ --list-modules
      Error occurred during initialization of boot layer
      java.lang.module.FindException: Unable to derive module descriptor for ./target/dependency/resteasy-validator-provider-11-4.0.0-SNAPSHOT.jar
      Caused by: java.lang.IllegalArgumentException: resteasy.validator.provider.11: Invalid module name: '11' is not a Java identifier
      [mkopecky@localhost single-client]$ rm ./target/dependency/resteasy-validator-provider-11-4.0.0-SNAPSHOT.jar
      [mkopecky@localhost single-client]$ java -p ./target/dependency/ --list-modules
      java.activation@10
      java.base@10
      java.compiler@10
      java.corba@10
      java.datatransfer@10
      java.desktop@10
      java.instrument@10
      java.jnlp@10
      java.logging@10
      java.management@10
      java.management.rmi@10
      java.naming@10
      java.prefs@10
      java.rmi@10
      java.scripting@10
      java.se@10
      java.se.ee@10
      java.security.jgss@10
      java.security.sasl@10
      java.smartcardio@10
      java.sql@10
      java.sql.rowset@10
      java.transaction@10
      java.xml@10
      java.xml.bind@10
      java.xml.crypto@10
      java.xml.ws@10
      java.xml.ws.annotation@10
      javafx.base@10
      javafx.controls@10
      javafx.deploy@10
      javafx.fxml@10
      javafx.graphics@10
      javafx.media@10
      javafx.swing@10
      javafx.web@10
      jdk.accessibility@10
      jdk.aot@10
      jdk.attach@10
      jdk.charsets@10
      jdk.compiler@10
      jdk.crypto.cryptoki@10
      jdk.crypto.ec@10
      jdk.deploy@10
      jdk.deploy.controlpanel@10
      jdk.dynalink@10
      jdk.editpad@10
      jdk.hotspot.agent@10
      jdk.httpserver@10
      jdk.incubator.httpclient@10
      jdk.internal.ed@10
      jdk.internal.jvmstat@10
      jdk.internal.le@10
      jdk.internal.opt@10
      jdk.internal.vm.ci@10
      jdk.internal.vm.compiler@10
      jdk.internal.vm.compiler.management@10
      jdk.jartool@10
      jdk.javadoc@10
      jdk.javaws@10
      jdk.jcmd@10
      jdk.jconsole@10
      jdk.jdeps@10
      jdk.jdi@10
      jdk.jdwp.agent@10
      jdk.jfr@10
      jdk.jlink@10
      jdk.jshell@10
      jdk.jsobject@10
      jdk.jstatd@10
      jdk.localedata@10
      jdk.management@10
      jdk.management.agent@10
      jdk.management.cmm@10
      jdk.management.jfr@10
      jdk.management.resource@10
      jdk.naming.dns@10
      jdk.naming.rmi@10
      jdk.net@10
      jdk.pack@10
      jdk.packager@10
      jdk.packager.services@10
      jdk.plugin@10
      jdk.plugin.server@10
      jdk.rmic@10
      jdk.scripting.nashorn@10
      jdk.scripting.nashorn.shell@10
      jdk.sctp@10
      jdk.security.auth@10
      jdk.security.jgss@10
      jdk.snmp@10
      jdk.unsupported@10
      jdk.xml.bind@10
      jdk.xml.dom@10
      jdk.xml.ws@10
      jdk.zipfs@10
      oracle.desktop@10
      oracle.net@10
      activation@1.1.1 file:///home/mkopecky/erase14/single-client/./target/dependency/activation-1.1.1.jar automatic
      apache.mime4j@0.6 file:///home/mkopecky/erase14/single-client/./target/dependency/apache-mime4j-0.6.jar automatic
      beta.jboss.jaxrs.api_2_1@1.0.0.Final file:///home/mkopecky/erase14/single-client/./target/dependency/jboss-jaxrs-api_2.1_spec-1.0.0.Final.jar automatic
      cdi.api@2.0 file:///home/mkopecky/erase14/single-client/./target/dependency/cdi-api-2.0.jar automatic
      com.fasterxml.classmate@1.3.4 file:///home/mkopecky/erase14/single-client/./target/dependency/classmate-1.3.4.jar automatic
      com.fasterxml.jackson.annotation@2.9.5 file:///home/mkopecky/erase14/single-client/./target/dependency/jackson-annotations-2.9.5.jar automatic
      com.fasterxml.jackson.core@2.9.5 file:///home/mkopecky/erase14/single-client/./target/dependency/jackson-core-2.9.5.jar automatic
      com.fasterxml.jackson.databind@2.9.5 file:///home/mkopecky/erase14/single-client/./target/dependency/jackson-databind-2.9.5.jar automatic
      com.fasterxml.jackson.jaxrs.json@2.9.5 file:///home/mkopecky/erase14/single-client/./target/dependency/jackson-jaxrs-json-provider-2.9.5.jar automatic
      com.fasterxml.jackson.module.jaxb@2.9.5 file:///home/mkopecky/erase14/single-client/./target/dependency/jackson-module-jaxb-annotations-2.9.5.jar automatic
      commons.codec@1.10 file:///home/mkopecky/erase14/single-client/./target/dependency/commons-codec-1.10.jar automatic
      commons.io@2.5 file:///home/mkopecky/erase14/single-client/./target/dependency/commons-io-2.5.jar automatic
      commons.logging@1.2 file:///home/mkopecky/erase14/single-client/./target/dependency/commons-logging-1.2.jar automatic
      guava@14.0 file:///home/mkopecky/erase14/single-client/./target/dependency/guava-14.0.jar automatic
      hibernate.validator@5.2.4.Final file:///home/mkopecky/erase14/single-client/./target/dependency/hibernate-validator-5.2.4.Final.jar automatic
      httpclient@4.5.4 file:///home/mkopecky/erase14/single-client/./target/dependency/httpclient-4.5.4.jar automatic
      httpcore@4.4.7 file:///home/mkopecky/erase14/single-client/./target/dependency/httpcore-4.4.7.jar automatic
      jackson.coreutils@1.0 file:///home/mkopecky/erase14/single-client/./target/dependency/jackson-coreutils-1.0.jar automatic
      jackson.jaxrs.base@2.9.5 file:///home/mkopecky/erase14/single-client/./target/dependency/jackson-jaxrs-base-2.9.5.jar automatic
      java.json file:///home/mkopecky/erase14/single-client/./target/dependency/javax.json-api-1.1.2.jar
      java.json.bind file:///home/mkopecky/erase14/single-client/./target/dependency/javax.json.bind-api-1.0.jar
      javax.el.api@3.0.0 file:///home/mkopecky/erase14/single-client/./target/dependency/javax.el-api-3.0.0.jar automatic
      javax.inject@1 file:///home/mkopecky/erase14/single-client/./target/dependency/javax.inject-1.jar automatic
      javax.interceptor.api@1.2 file:///home/mkopecky/erase14/single-client/./target/dependency/javax.interceptor-api-1.2.jar automatic
      javax.mail@1.5.6 file:///home/mkopecky/erase14/single-client/./target/dependency/javax.mail-1.5.6.jar automatic
      jaxb.core@2.3.0 file:///home/mkopecky/erase14/single-client/./target/dependency/jaxb-core-2.3.0.jar automatic
      jaxb.impl@2.3.0 file:///home/mkopecky/erase14/single-client/./target/dependency/jaxb-impl-2.3.0.jar automatic
      jboss.logging@3.3.1.Final file:///home/mkopecky/erase14/single-client/./target/dependency/jboss-logging-3.3.1.Final.jar automatic
      jcip.annotations@1.0 file:///home/mkopecky/erase14/single-client/./target/dependency/jcip-annotations-1.0.jar automatic
      jettison@1.4.0 file:///home/mkopecky/erase14/single-client/./target/dependency/jettison-1.4.0.jar automatic
      json.patch@1.3 file:///home/mkopecky/erase14/single-client/./target/dependency/json-patch-1.3.jar automatic
      microprofile.config.api@1.1 file:///home/mkopecky/erase14/single-client/./target/dependency/microprofile-config-api-1.1.jar automatic
      microprofile.rest.client.api@1.0 file:///home/mkopecky/erase14/single-client/./target/dependency/microprofile-rest-client-api-1.0.jar automatic
      org.eclipse.yasson file:///home/mkopecky/erase14/single-client/./target/dependency/yasson-1.0.1.jar
      org.glassfish.java.json file:///home/mkopecky/erase14/single-client/./target/dependency/javax.json-1.1.2.jar
      org.osgi.annotation.versioning@1.0.0 file:///home/mkopecky/erase14/single-client/./target/dependency/org.osgi.annotation.versioning-1.0.0.jar automatic
      org.reactivestreams@1.0.2 file:///home/mkopecky/erase14/single-client/./target/dependency/reactive-streams-1.0.2.jar automatic
      resteasy.atom.provider@4.0.0-SNAPSHOT file:///home/mkopecky/erase14/single-client/./target/dependency/resteasy-atom-provider-4.0.0-SNAPSHOT.jar automatic
      resteasy.cdi@4.0.0-SNAPSHOT file:///home/mkopecky/erase14/single-client/./target/dependency/resteasy-cdi-4.0.0-SNAPSHOT.jar automatic
      resteasy.client@4.0.0-SNAPSHOT file:///home/mkopecky/erase14/single-client/./target/dependency/resteasy-client-4.0.0-SNAPSHOT.jar automatic
      resteasy.jackson2.provider@4.0.0-SNAPSHOT file:///home/mkopecky/erase14/single-client/./target/dependency/resteasy-jackson2-provider-4.0.0-SNAPSHOT.jar automatic
      resteasy.jaxb.provider@4.0.0-SNAPSHOT file:///home/mkopecky/erase14/single-client/./target/dependency/resteasy-jaxb-provider-4.0.0-SNAPSHOT.jar automatic
      resteasy.jaxrs@4.0.0-SNAPSHOT file:///home/mkopecky/erase14/single-client/./target/dependency/resteasy-jaxrs-4.0.0-SNAPSHOT.jar automatic
      resteasy.jettison.provider@4.0.0-SNAPSHOT file:///home/mkopecky/erase14/single-client/./target/dependency/resteasy-jettison-provider-4.0.0-SNAPSHOT.jar automatic
      resteasy.json.binding.provider@4.0.0-SNAPSHOT file:///home/mkopecky/erase14/single-client/./target/dependency/resteasy-json-binding-provider-4.0.0-SNAPSHOT.jar automatic
      resteasy.json.p.provider@4.0.0-SNAPSHOT file:///home/mkopecky/erase14/single-client/./target/dependency/resteasy-json-p-provider-4.0.0-SNAPSHOT.jar automatic
      resteasy.multipart.provider@4.0.0-SNAPSHOT file:///home/mkopecky/erase14/single-client/./target/dependency/resteasy-multipart-provider-4.0.0-SNAPSHOT.jar automatic
      resteasy.yaml.provider@4.0.0-SNAPSHOT file:///home/mkopecky/erase14/single-client/./target/dependency/resteasy-yaml-provider-4.0.0-SNAPSHOT.jar automatic
      snakeyaml@1.19 file:///home/mkopecky/erase14/single-client/./target/dependency/snakeyaml-1.19.jar automatic
      validation.api@1.1.0.Final file:///home/mkopecky/erase14/single-client/./target/dependency/validation-api-1.1.0.Final.jar automatic
      [mkopecky@localhost single-client]$
      

      Full TS pom file, I just remove log4j and resteasy-crypto (not delivered to WF)

      resteasy-client-pom.xml

      Steps to reproduce:

      rm -rf target
      mvn -f resteasy-client-pom.xml dependency:copy-dependencies
      java -p ./target/dependency/ --list-modules
      rm ./target/dependency/jboss-ejb-api_3.2_spec-1.0.0.Final.jar
      java -p ./target/dependency/ --list-modules
      rm ./target/dependency/resteasy-jaxrs-services-4.0.0-SNAPSHOT.jar
      java -p ./target/dependency/ --list-modules
      rm ./target/dependency/jboss-annotations-api_1.2_spec-1.0.0.Final.jar
      java -p ./target/dependency/ --list-modules
      rm ./target/dependency/jboss-servlet-api_3.1_spec-1.0.0.Final.jar
      java -p ./target/dependency/ --list-modules
      rm ./target/dependency/jboss-jaxb-api_2.3_spec-1.0.0.Final.jar
      java -p ./target/dependency/ --list-modules
      rm ./target/dependency/resteasy-validator-provider-11-4.0.0-SNAPSHOT.jar
      java -p ./target/dependency/ --list-modules
      rm ./target/dependency/jboss-jms-api_2.0_spec-1.0.0.Final.jar
      java -p ./target/dependency/ --list-modules
      rm ./target/dependency/jboss-el-api_3.0_spec-1.0.7.Final.jar
      java -p ./target/dependency/ --list-modules
      

      Results:

      [mkopecky@localhost single-client]$ rm -rf target
      [mkopecky@localhost single-client]$ mvn -f resteasy-client-pom.xml dependency:copy-dependencies
      ...
      [mkopecky@localhost single-client]$ java -p ./target/dependency/ --list-modules
      Error occurred during initialization of boot layer
      java.lang.module.FindException: Unable to derive module descriptor for ./target/dependency/jboss-ejb-api_3.2_spec-1.0.0.Final.jar
      Caused by: java.lang.IllegalArgumentException: jboss.ejb.api.3.2.spec: Invalid module name: '3' is not a Java identifier
      [mkopecky@localhost single-client]$ rm ./target/dependency/jboss-ejb-api_3.2_spec-1.0.0.Final.jar
      [mkopecky@localhost single-client]$ java -p ./target/dependency/ --list-modules
      Error occurred during initialization of boot layer
      java.lang.module.FindException: Unable to derive module descriptor for ./target/dependency/resteasy-jaxrs-services-4.0.0-SNAPSHOT.jar
      Caused by: java.lang.module.InvalidModuleDescriptorException: Provider class org.jboss.resteasy.spi.ResteasyProviderFactory not in module
      [mkopecky@localhost single-client]$ rm ./target/dependency/resteasy-jaxrs-services-4.0.0-SNAPSHOT.jar
      [mkopecky@localhost single-client]$ java -p ./target/dependency/ --list-modules
      Error occurred during initialization of boot layer
      java.lang.module.FindException: Unable to derive module descriptor for ./target/dependency/jboss-annotations-api_1.2_spec-1.0.0.Final.jar
      Caused by: java.lang.IllegalArgumentException: jboss.annotations.api.1.2.spec: Invalid module name: '1' is not a Java identifier
      [mkopecky@localhost single-client]$ rm ./target/dependency/jboss-annotations-api_1.2_spec-1.0.0.Final.jar
      [mkopecky@localhost single-client]$ java -p ./target/dependency/ --list-modules
      Error occurred during initialization of boot layer
      java.lang.module.FindException: Unable to derive module descriptor for ./target/dependency/jboss-servlet-api_3.1_spec-1.0.0.Final.jar
      Caused by: java.lang.IllegalArgumentException: jboss.servlet.api.3.1.spec: Invalid module name: '3' is not a Java identifier
      [mkopecky@localhost single-client]$ rm ./target/dependency/jboss-servlet-api_3.1_spec-1.0.0.Final.jar
      [mkopecky@localhost single-client]$ java -p ./target/dependency/ --list-modules
      Error occurred during initialization of boot layer
      java.lang.module.FindException: Unable to derive module descriptor for ./target/dependency/jboss-jaxb-api_2.3_spec-1.0.0.Final.jar
      Caused by: java.lang.IllegalArgumentException: jboss.jaxb.api.2.3.spec: Invalid module name: '2' is not a Java identifier
      [mkopecky@localhost single-client]$ rm ./target/dependency/jboss-jaxb-api_2.3_spec-1.0.0.Final.jar
      [mkopecky@localhost single-client]$ java -p ./target/dependency/ --list-modules
      Error occurred during initialization of boot layer
      java.lang.module.FindException: Unable to derive module descriptor for ./target/dependency/resteasy-validator-provider-11-4.0.0-SNAPSHOT.jar
      Caused by: java.lang.IllegalArgumentException: resteasy.validator.provider.11: Invalid module name: '11' is not a Java identifier
      [mkopecky@localhost single-client]$ rm ./target/dependency/resteasy-validator-provider-11-4.0.0-SNAPSHOT.jar
      [mkopecky@localhost single-client]$ java -p ./target/dependency/ --list-modules
      Error occurred during initialization of boot layer
      java.lang.module.FindException: Unable to derive module descriptor for ./target/dependency/jboss-jms-api_2.0_spec-1.0.0.Final.jar
      Caused by: java.lang.IllegalArgumentException: jboss.jms.api.2.0.spec: Invalid module name: '2' is not a Java identifier
      [mkopecky@localhost single-client]$ rm ./target/dependency/jboss-jms-api_2.0_spec-1.0.0.Final.jar
      [mkopecky@localhost single-client]$ java -p ./target/dependency/ --list-modules
      Error occurred during initialization of boot layer
      java.lang.module.FindException: Unable to derive module descriptor for ./target/dependency/jboss-el-api_3.0_spec-1.0.7.Final.jar
      Caused by: java.lang.IllegalArgumentException: jboss.el.api.3.0.spec: Invalid module name: '3' is not a Java identifier
      [mkopecky@localhost single-client]$ rm ./target/dependency/jboss-el-api_3.0_spec-1.0.7.Final.jar
      [mkopecky@localhost single-client]$ java -p ./target/dependency/ --list-modules
      Error occurred during initialization of boot layer
      java.lang.module.ResolutionException: Modules jaxb.core and jaxb.impl export package com.sun.xml.bind.marshaller to module microprofile.config.api
      [mkopecky@localhost single-client]$ 
      

              rsearls r searls
              mkopecky@redhat.com Marek Kopecky
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: