Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-12290

Class java.net.HttpClient not found in Wildfly 17

XMLWordPrintable

    • Hide

      Use the appropriate API from the JDK.

      Show
      Use the appropriate API from the JDK.
    • Workaround Exists
    • Hide

      Adding the Dependency in the maven-file works fine.

      {{<plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-war-plugin</artifactId>
      <version>2.3</version>
      <configuration>
      <archive>
      <manifestEntries>
      <Dependencies>java.net.http</Dependencies>
      </manifestEntries>
      </archive>
      </configuration>
      </plugin>}}

      Show
      Adding the Dependency in the maven-file works fine. {{<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.3</version> <configuration> <archive> <manifestEntries> <Dependencies>java.net.http</Dependencies> </manifestEntries> </archive> </configuration> </plugin>}}

      When I deploy my war module, I get the following error:
      Caused by: java.lang.ClassNotFoundException: java.net.http.HttpClient from [Module "deployment.webservice-impl-1-3.0.0.war" from Service Module Loader]
      In the same environment is also a Wildfly 16.0.0 installed. There the war module starts without errors.

      In the discussion on https://developer.jboss.org/message/990207?et=watches.email.thread#990207 it was said that this was not considered by the upgrading of the JBoss module:
      https://github.com/wildfly/wildfly-core/commit/fc649ab01eff81c55084d241fb2c57e012830364#diff-23e5fdc1c637eca93f059ac5c61f51fb

            ropalka Richard Opalka
            andre.kornetzky André Kornetzky (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: