title: Caused by: org.jboss.modules.ModuleNotFoundException: java.net.http"}} when trying to use thorntail
body: <p>I am trying to run a rest service using thorntail and maven, and in it i need to use the java.net.http httpClient and process the result. But i am getting those errors when i am trying to run it.</p>
  <p>I know thorntail is outdated and no longer supported but not using it is not really an option for me at that point.</p>
  <pre><code>2021-05-04 18:25:16,353 INFO  [org.wildfly.swarm] (main) THORN0013: Installed fraction:                 Undertow - STABLE          io.thorntail:undertow:2.7.0.Final
  2021-05-04 18:25:16,374 INFO  [org.wildfly.swarm] (main) THORN0013: Installed fraction:                  Logging - STABLE          io.thorntail:logging:2.7.0.Final
  2021-05-04 18:25:16,374 INFO  [org.wildfly.swarm] (main) THORN0013: Installed fraction:                   JAX-RS - STABLE          io.thorntail:jaxrs:2.7.0.Final
  2021-05-04 18:25:16,375 INFO  [org.wildfly.swarm] (main) THORN0013: Installed fraction:                  Elytron - STABLE          io.thorntail:elytron:2.7.0.Final
  2021-05-04 18:25:19,311 INFO  [org.jboss.msc] (main) JBoss MSC version 1.4.11.Final
  2021-05-04 18:25:19,323 INFO  [org.jboss.threads] (main) JBoss Threads version 2.3.3.Final
  2021-05-04 18:25:19,446 INFO  [org.jboss.as] (MSC service thread 1-2) WFLYSRV0049: Thorntail 2.7.0.Final (WildFly Core 10.0.3.Final) starting
  2021-05-04 18:25:19,680 INFO  [org.wildfly.swarm] (MSC service thread 1-2) THORN0019: Install MSC service for command line args: []
  2021-05-04 18:25:20,378 INFO  [org.wildfly.security] (ServerService Thread Pool -- 3) ELY00001: WildFly Elytron version 1.10.4.Final
  2021-05-04 18:25:20,712 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 13) WFLYSEC0002: Activating Security Subsystem
  2021-05-04 18:25:20,716 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 18) WFLYNAM0001: Activating Naming Subsystem
  2021-05-04 18:25:20,720 INFO  [org.jboss.as.security] (MSC service thread 1-1) WFLYSEC0001: Current PicketBox version=5.0.3.Final
  2021-05-04 18:25:20,741 INFO  [org.xnio] (ServerService Thread Pool -- 11) XNIO version 3.7.3.Final
  2021-05-04 18:25:20,762 INFO  [org.jboss.as.naming] (MSC service thread 1-2) WFLYNAM0003: Starting Naming Service
  2021-05-04 18:25:20,791 INFO  [org.xnio.nio] (ServerService Thread Pool -- 11) XNIO NIO Implementation Version 3.7.3.Final
  2021-05-04 18:25:20,844 INFO  [org.wildfly.extension.io] (ServerService Thread Pool -- 11) WFLYIO001: Worker 'default' has auto-configured to 24 core threads with 192 task threads based on your 12 available processors
  2021-05-04 18:25:20,847 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-8) WFLYUT0003: Undertow 2.1.3.Final starting
  2021-05-04 18:25:20,866 INFO  [org.jboss.as.jaxrs] (ServerService Thread Pool -- 14) WFLYRS0016: RESTEasy version 3.11.2.Final
  2021-05-04 18:25:20,961 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-7) WFLYUT0012: Started server default-server.
  2021-05-04 18:25:21,034 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-8) WFLYUT0006: Undertow HTTP listener default listening on 0.0.0.0:8080
  2021-05-04 18:25:21,156 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
  2021-05-04 18:25:21,160 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: Thorntail 2.7.0.Final (WildFly Core 10.0.3.Final) started in 1919ms - Started 99 of 105 services (22 services are lazy, passive or on-demand)
  2021-05-04 18:25:21,630 INFO  [org.wildfly.swarm.runtime.deployer] (main) deploying film.war
  2021-05-04 18:25:21,674 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0027: Starting deployment of &quot;film.war&quot; (runtime-name: &quot;film.war&quot;)
  2021-05-04 18:25:22,522 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.module.service.&quot;deployment.film.war&quot;.main: org.jboss.msc.service.StartException in service jboss.module.service.&quot;deployment.film.war&quot;.main: WFLYSRV0179: Failed to load module: deployment.film.war
      at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:116)
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
      at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
      at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
      at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
      at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
      at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
      at java.lang.Thread.run(Thread.java:745)
  Caused by: org.jboss.modules.ModuleNotFoundException: java.net.http
      at org.jboss.modules.Module.addPaths(Module.java:1266)
      at org.jboss.modules.Module.link(Module.java:1622)
      at org.jboss.modules.Module.relinkIfNecessary(Module.java:1650)
      at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:299)
      at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:283)
      at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:93)
      ... 8 more
  
  2021-05-04 18:25:22,529 ERROR [org.jboss.as.controller.management-operation] (main) WFLYCTL0013: Operation (&quot;add&quot;) failed - address: ((&quot;deployment&quot; =&gt; &quot;film.war&quot;)) - failure description: {&quot;WFLYCTL0080: Failed services&quot; =&gt; {&quot;jboss.module.service.\&quot;deployment.film.war\&quot;.main&quot; =&gt; &quot;WFLYSRV0179: Failed to load module: deployment.film.war
      Caused by: org.jboss.modules.ModuleNotFoundException: java.net.http&quot;}}
  2021-05-04 18:25:22,530 ERROR [org.jboss.as.server] (main) WFLYSRV0021: Deploy of deployment &quot;film.war&quot; was rolled back with the following failure message: 
  {&quot;WFLYCTL0080: Failed services&quot; =&gt; {&quot;jboss.module.service.\&quot;deployment.film.war\&quot;.main&quot; =&gt; &quot;WFLYSRV0179: Failed to load module: deployment.film.war
      Caused by: org.jboss.modules.ModuleNotFoundException: java.net.http&quot;}}
  2021-05-04 18:25:22,543 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0028: Stopped deployment film.war (runtime-name: film.war) in 11ms
  2021-05-04 18:25:22,547 ERROR [stderr] (main) org.wildfly.swarm.container.DeploymentException: org.wildfly.swarm.container.DeploymentException: THORN0004: Deployment failed: {&quot;WFLYCTL0080: Failed services&quot; =&gt; {&quot;jboss.module.service.\&quot;deployment.film.war\&quot;.main&quot; =&gt; &quot;WFLYSRV0179: Failed to load module: deployment.film.war
  2021-05-04 18:25:22,547 ERROR [stderr] (main)     Caused by: org.jboss.modules.ModuleNotFoundException: java.net.http&quot;}}
  2021-05-04 18:25:22,547 ERROR [stderr] (main)   at org.wildfly.swarm.container.runtime.RuntimeDeployer.deploy(RuntimeDeployer.java:301)
  2021-05-04 18:25:22,548 ERROR [stderr] (main)   at org.wildfly.swarm.container.runtime.RuntimeDeployer.deploy(RuntimeDeployer.java:174)
  2021-05-04 18:25:22,548 ERROR [stderr] (main)   at org.wildfly.swarm.container.runtime.RuntimeDeployer.deploy(RuntimeDeployer.java:107)
  2021-05-04 18:25:22,548 ERROR [stderr] (main)   at org.wildfly.swarm.container.runtime.RuntimeDeployer$Proxy$_$$_WeldClientProxy.deploy(Unknown Source)
  2021-05-04 18:25:22,548 ERROR [stderr] (main)   at org.wildfly.swarm.Swarm.deploy(Swarm.java:476)
  2021-05-04 18:25:22,549 ERROR [stderr] (main)   at org.wildfly.swarm.Swarm.main(Swarm.java:747)
  2021-05-04 18:25:22,549 ERROR [stderr] (main)   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  2021-05-04 18:25:22,549 ERROR [stderr] (main)   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  2021-05-04 18:25:22,549 ERROR [stderr] (main)   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  2021-05-04 18:25:22,550 ERROR [stderr] (main)   at java.lang.reflect.Method.invoke(Method.java:498)
  2021-05-04 18:25:22,550 ERROR [stderr] (main)   at org.wildfly.swarm.bootstrap.MainInvoker.invoke(MainInvoker.java:57)
  2021-05-04 18:25:22,550 ERROR [stderr] (main)   at org.wildfly.swarm.bootstrap.Main.run(Main.java:134)
  2021-05-04 18:25:22,550 ERROR [stderr] (main)   at org.wildfly.swarm.bootstrap.Main.main(Main.java:87)
  2021-05-04 18:25:22,551 ERROR [stderr] (main) Caused by: org.wildfly.swarm.container.DeploymentException: THORN0004: Deployment failed: {&quot;WFLYCTL0080: Failed services&quot; =&gt; {&quot;jboss.module.service.\&quot;deployment.film.war\&quot;.main&quot; =&gt; &quot;WFLYSRV0179: Failed to load module: deployment.film.war
  2021-05-04 18:25:22,551 ERROR [stderr] (main)     Caused by: org.jboss.modules.ModuleNotFoundException: java.net.http&quot;}}
  2021-05-04 18:25:22,551 ERROR [stderr] (main)   at org.wildfly.swarm.container.runtime.RuntimeDeployer.deploy(RuntimeDeployer.java:296)
  2021-05-04 18:25:22,552 ERROR [stderr] (main)   ... 12 more
  2021-05-04 18:25:22,555 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-4) WFLYUT0008: Undertow HTTP listener default suspending
  2021-05-04 18:25:22,559 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-4) WFLYUT0007: Undertow HTTP listener default stopped, was bound to 0.0.0.0:8080
  2021-05-04 18:25:22,570 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-4) WFLYUT0004: Undertow 2.1.3.Final stopping
  2021-05-04 18:25:22,594 INFO  [org.jboss.as] (MSC service thread 1-5) WFLYSRV0050: Thorntail 2.7.0.Final (WildFly Core 10.0.3.Final) stopped in 35ms
  2021-05-04 18:25:22,716 ERROR [stderr] (main) org.wildfly.swarm.container.DeploymentException: org.wildfly.swarm.container.DeploymentException: THORN0004: Deployment failed: {&quot;WFLYCTL0080: Failed services&quot; =&gt; {&quot;jboss.module.service.\&quot;deployment.film.war\&quot;.main&quot; =&gt; &quot;WFLYSRV0179: Failed to load module: deployment.film.war
  2021-05-04 18:25:22,716 ERROR [stderr] (main)     Caused by: org.jboss.modules.ModuleNotFoundException: java.net.http&quot;}}
  2021-05-04 18:25:22,716 ERROR [stderr] (main)   at org.wildfly.swarm.container.runtime.RuntimeDeployer.deploy(RuntimeDeployer.java:301)
  2021-05-04 18:25:22,717 ERROR [stderr] (main)   at org.wildfly.swarm.container.runtime.RuntimeDeployer.deploy(RuntimeDeployer.java:174)
  2021-05-04 18:25:22,717 ERROR [stderr] (main)   at org.wildfly.swarm.container.runtime.RuntimeDeployer.deploy(RuntimeDeployer.java:107)
  2021-05-04 18:25:22,717 ERROR [stderr] (main)   at org.wildfly.swarm.container.runtime.RuntimeDeployer$Proxy$_$$_WeldClientProxy.deploy(Unknown Source)
  2021-05-04 18:25:22,718 ERROR [stderr] (main)   at org.wildfly.swarm.Swarm.deploy(Swarm.java:476)
  2021-05-04 18:25:22,718 ERROR [stderr] (main)   at org.wildfly.swarm.Swarm.main(Swarm.java:747)
  2021-05-04 18:25:22,718 ERROR [stderr] (main)   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  2021-05-04 18:25:22,719 ERROR [stderr] (main)   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  2021-05-04 18:25:22,719 ERROR [stderr] (main)   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  2021-05-04 18:25:22,719 ERROR [stderr] (main)   at java.lang.reflect.Method.invoke(Method.java:498)
  2021-05-04 18:25:22,720 ERROR [stderr] (main)   at org.wildfly.swarm.bootstrap.MainInvoker.invoke(MainInvoker.java:57)
  2021-05-04 18:25:22,720 ERROR [stderr] (main)   at org.wildfly.swarm.bootstrap.Main.run(Main.java:134)
  2021-05-04 18:25:22,721 ERROR [stderr] (main)   at org.wildfly.swarm.bootstrap.Main.main(Main.java:87)
  2021-05-04 18:25:22,721 ERROR [stderr] (main) Caused by: org.wildfly.swarm.container.DeploymentException: THORN0004: Deployment failed: {&quot;WFLYCTL0080: Failed services&quot; =&gt; {&quot;jboss.module.service.\&quot;deployment.film.war\&quot;.main&quot; =&gt; &quot;WFLYSRV0179: Failed to load module: deployment.film.war
  2021-05-04 18:25:22,721 ERROR [stderr] (main)     Caused by: org.jboss.modules.ModuleNotFoundException: java.net.http&quot;}}
  2021-05-04 18:25:22,721 ERROR [stderr] (main)   at org.wildfly.swarm.container.runtime.RuntimeDeployer.deploy(RuntimeDeployer.java:296)
  2021-05-04 18:25:22,722 ERROR [stderr] (main)   ... 12 more
  2021-05-04 18:25:22,722 ERROR [stderr] (main) java.lang.IllegalStateException: zip file closed
  2021-05-04 18:25:22,722 ERROR [stderr] (main)   at java.util.zip.ZipFile.ensureOpen(ZipFile.java:669)
  2021-05-04 18:25:22,723 ERROR [stderr] (main)   at java.util.zip.ZipFile.getEntry(ZipFile.java:309)
  2021-05-04 18:25:22,723 ERROR [stderr] (main)   at java.util.jar.JarFile.getEntry(JarFile.java:240)
  2021-05-04 18:25:22,723 ERROR [stderr] (main)   at java.util.jar.JarFile.getJarEntry(JarFile.java:223)
  2021-05-04 18:25:22,723 ERROR [stderr] (main)   at org.jboss.modules.JarFileResourceLoader.getJarEntry(JarFileResourceLoader.java:187)
  2021-05-04 18:25:22,724 ERROR [stderr] (main)   at org.jboss.modules.JarFileResourceLoader.getClassSpec(JarFileResourceLoader.java:130)
  2021-05-04 18:25:22,724 ERROR [stderr] (main)   at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:330)
  2021-05-04 18:25:22,724 ERROR [stderr] (main)   at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:126)
  2021-05-04 18:25:22,725 ERROR [stderr] (main)   at org.jboss.modules.Module.loadModuleClass(Module.java:731)
  2021-05-04 18:25:22,725 ERROR [stderr] (main)   at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:247)
  2021-05-04 18:25:22,725 ERROR [stderr] (main)   at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
  2021-05-04 18:25:22,725 ERROR [stderr] (main)   at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
  2021-05-04 18:25:22,726 ERROR [stderr] (main)   at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
  2021-05-04 18:25:22,726 ERROR [stderr] (main)   at org.wildfly.swarm.Swarm.stop(Swarm.java:438)
  2021-05-04 18:25:22,726 ERROR [stderr] (main)   at org.wildfly.swarm.Swarm.tryToStopAfterStartupError(Swarm.java:779)
  2021-05-04 18:25:22,727 ERROR [stderr] (main)   at org.wildfly.swarm.Swarm.main(Swarm.java:756)
  2021-05-04 18:25:22,727 ERROR [stderr] (main)   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  2021-05-04 18:25:22,727 ERROR [stderr] (main)   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  2021-05-04 18:25:22,727 ERROR [stderr] (main)   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  2021-05-04 18:25:22,728 ERROR [stderr] (main)   at java.lang.reflect.Method.invoke(Method.java:498)
  2021-05-04 18:25:22,728 ERROR [stderr] (main)   at org.wildfly.swarm.bootstrap.MainInvoker.invoke(MainInvoker.java:57)
  2021-05-04 18:25:22,728 ERROR [stderr] (main)   at org.wildfly.swarm.bootstrap.Main.run(Main.java:134)
  2021-05-04 18:25:22,729 ERROR [stderr] (main)   at org.wildfly.swarm.bootstrap.Main.main(Main.java:87)
  </code></pre>
  <p>the call to httpCLient is like this:</p>
  <pre><code>package api.model;
  
  import java.io.IOException;
  import java.net.URI;
  import java.net.http.HttpClient;
  import java.net.http.HttpRequest;
  import java.net.http.HttpResponse;
  import java.text.DateFormat;
  import java.text.SimpleDateFormat;
  import java.util.ArrayList;
  import java.util.Collections;
  import java.util.Date;
  import java.util.List;
  import java.util.Random;
  import java.util.function.Supplier;
  
  import com.fasterxml.jackson.core.JsonProcessingException;
  import com.fasterxml.jackson.core.type.TypeReference;
  import com.fasterxml.jackson.databind.JsonMappingException;
  import com.fasterxml.jackson.databind.JsonNode;
  import com.fasterxml.jackson.databind.ObjectMapper;
  
  public class TMDB_Caller {
  
      //variables
      private String apiKey;
      private int pageSize = 20;
  
      
      //connstracteur---------------------------------------------------------------------------------------------------
      public TMDB_Caller(String apiKey) {
          super();
          this.apiKey = apiKey;
      }
      
      ///////////     Genres      /////////////
  
      //listAllGenres_uri-------------------------------------------------------------------------------------------------
      public String listAllGenres_uri() {
          //https://api.themoviedb.org/3/genre/movie/list?api_key=3aacfef6a62a872d2a4717b9b6cd5283&amp;language=en-US
          return &quot;https://api.themoviedb.org/3/genre/movie/list?api_key=&quot;+apiKey+&quot;&amp;language=en-US&quot;;
      }
      
  //getAllGenres()----------------------------------------------------------------------------------------------------
      public List&lt;Genre&gt; getAllGenres() throws IOException, InterruptedException {
          String uri = listAllGenres_uri();
          
          HttpClient client = HttpClient.newHttpClient();
          HttpRequest request = HttpRequest.newBuilder()
                .uri(URI.create(uri))
                .build();
          
          HttpResponse&lt;Supplier&lt;AllGenresBody&gt;&gt; response = client.send(request, new JsonBodyHandler&lt;&gt;(AllGenresBody.class));
          Supplier&lt;AllGenresBody&gt; allGenres_result = response.body();
          
          String genres_str = allGenres_result.get().genres.toPrettyString();
          
          ObjectMapper mapper = new ObjectMapper();
          List&lt;Genre&gt; genreList = mapper.readValue(genres_str, new TypeReference&lt;List&lt;Genre&gt;&gt;() {});
          
          return genreList;
      }
  
  }
  </code></pre>
  <p>the pom.xml file of the module:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
           xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&quot;&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
    &lt;parent&gt;
      &lt;groupId&gt;api&lt;/groupId&gt;
      &lt;artifactId&gt;app&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
    &lt;/parent&gt;
  
    &lt;groupId&gt;api&lt;/groupId&gt;
    &lt;artifactId&gt;film&lt;/artifactId&gt;
    &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
    &lt;packaging&gt;war&lt;/packaging&gt;
  
    &lt;name&gt;film&lt;/name&gt;
  
    &lt;properties&gt;
      &lt;maven.compiler.source&gt;11&lt;/maven.compiler.source&gt;
      &lt;maven.compiler.target&gt;11&lt;/maven.compiler.target&gt;
  
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
  
      &lt;failOnMissingWebXml&gt;false&lt;/failOnMissingWebXml&gt;
  
      &lt;version.thorntail&gt;2.7.0.Final&lt;/version.thorntail&gt;
  
      &lt;skip-docker-build&gt;false&lt;/skip-docker-build&gt;
    &lt;/properties&gt;
  
    &lt;dependencyManagement&gt;
      &lt;dependencies&gt;
        &lt;dependency&gt;
          &lt;groupId&gt;io.thorntail&lt;/groupId&gt;
          &lt;artifactId&gt;bom-all&lt;/artifactId&gt;
          &lt;version&gt;${version.thorntail}&lt;/version&gt;
          &lt;scope&gt;import&lt;/scope&gt;
          &lt;type&gt;pom&lt;/type&gt;
        &lt;/dependency&gt;
  
      &lt;dependency&gt;
         &lt;groupId&gt;org.json&lt;/groupId&gt;
         &lt;artifactId&gt;json&lt;/artifactId&gt;
         &lt;version&gt;20210307&lt;/version&gt;
       &lt;/dependency&gt;
      &lt;/dependencies&gt;
    &lt;/dependencyManagement&gt;
  
    &lt;build&gt;
      &lt;finalName&gt;${project.artifactId}&lt;/finalName&gt;
  
      &lt;plugins&gt;
        &lt;plugin&gt;
          &lt;groupId&gt;io.thorntail&lt;/groupId&gt;
          &lt;artifactId&gt;thorntail-maven-plugin&lt;/artifactId&gt;
          &lt;version&gt;${version.thorntail}&lt;/version&gt;
          
          &lt;executions&gt;
            &lt;execution&gt;
              &lt;goals&gt;
                &lt;goal&gt;package&lt;/goal&gt;
              &lt;/goals&gt;
            &lt;/execution&gt;
          &lt;/executions&gt;
        &lt;/plugin&gt;
      &lt;/plugins&gt;
    &lt;/build&gt;
  
    &lt;dependencies&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;javax&lt;/groupId&gt;
        &lt;artifactId&gt;javaee-api&lt;/artifactId&gt;
        &lt;version&gt;8.0&lt;/version&gt;
        &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
         &lt;groupId&gt;org.json&lt;/groupId&gt;
         &lt;artifactId&gt;json&lt;/artifactId&gt;
         &lt;version&gt;20210307&lt;/version&gt;
       &lt;/dependency&gt;
      
    &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  <p>the pom of the parent is:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot;
      xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
      xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&quot;&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;parent&gt;
          &lt;groupId&gt;api&lt;/groupId&gt;
          &lt;artifactId&gt;app&lt;/artifactId&gt;
          &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;/parent&gt;
  
      &lt;groupId&gt;api&lt;/groupId&gt;
      &lt;artifactId&gt;user&lt;/artifactId&gt;
      &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;
  
      &lt;name&gt;user&lt;/name&gt;
  
      &lt;properties&gt;
          &lt;maven.compiler.source&gt;11&lt;/maven.compiler.source&gt;
          &lt;maven.compiler.target&gt;11&lt;/maven.compiler.target&gt;
  
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
  
          &lt;failOnMissingWebXml&gt;false&lt;/failOnMissingWebXml&gt;
  
          &lt;version.thorntail&gt;2.7.0.Final&lt;/version.thorntail&gt;
  
          &lt;skip-docker-build&gt;false&lt;/skip-docker-build&gt;
      &lt;/properties&gt;
  
      &lt;dependencyManagement&gt;
          &lt;dependencies&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;junit&lt;/groupId&gt;
                  &lt;artifactId&gt;junit&lt;/artifactId&gt;
                  &lt;version&gt;4.11&lt;/version&gt;
                  &lt;scope&gt;test&lt;/scope&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;org.postgresql&lt;/groupId&gt;
                  &lt;artifactId&gt;postgresql&lt;/artifactId&gt;
                  &lt;version&gt;42.2.20&lt;/version&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;io.thorntail&lt;/groupId&gt;
                  &lt;artifactId&gt;bom-all&lt;/artifactId&gt;
                  &lt;version&gt;${version.thorntail}&lt;/version&gt;
                  &lt;scope&gt;import&lt;/scope&gt;
                  &lt;type&gt;pom&lt;/type&gt;
              &lt;/dependency&gt;
          &lt;/dependencies&gt;
      &lt;/dependencyManagement&gt;
  
      &lt;build&gt;
          &lt;finalName&gt;${project.artifactId}&lt;/finalName&gt;
  
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;io.thorntail&lt;/groupId&gt;
                  &lt;artifactId&gt;thorntail-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${version.thorntail}&lt;/version&gt;
  
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;package&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                   &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
                   &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
                   &lt;version&gt;1.2.1&lt;/version&gt;
                   &lt;configuration&gt;
                           &lt;mainClass&gt;api.model.App&lt;/mainClass&gt;
                   &lt;/configuration&gt;
           &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax&lt;/groupId&gt;
              &lt;artifactId&gt;javaee-api&lt;/artifactId&gt;
              &lt;version&gt;8.0&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  <p>the &quot;solution&quot; that was often on the net was to add a jboss-deployment-structure.xml file to WEB-INF the containing this:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot;?&gt;
  &lt;jboss-deployment-structure&gt;
      &lt;deployment&gt;
          &lt;dependencies&gt;
              &lt;module name=&quot;java.net.http&quot;/&gt;
          &lt;/dependencies&gt;
      &lt;/deployment&gt;
  &lt;/jboss-deployment-structure&gt;
  </code></pre>
  <p>but that did not solve the problem, I have found early advice for when the java.net.http was still in incubator stage but that did not fix it either.</p>
  <p>The question I have, I guess, is how do i fix this? Nothing i have found on the net really worked/applied to my situation.</p>
  <p>Is there some more additional info i need to provide?</p>