title: java.lang.NoClassDefFoundError: Could not initialize class reactor.netty.http.client.HttpClientConfig when I upgraded to Spring-boot 2.7
body: <p>I am getting this error upon building my project and I am not sure why. I only got it when I upgraded my Spring boot version to 2.7.2. It says in my error below</p>
  <blockquote>
  <p>java.lang.NoClassDefFoundError: Could not initialize class reactor.netty.http.client.HttpClientConfig
  at com.web.info.DataClientTest.setup(DataClientTest .java:42)</p>
  </blockquote>
  <p>I've already got this in my pom.xml:</p>
  <pre><code>&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/xsd/maven-4.0.0.xsd&quot;&gt;
  &lt;modelVersion&gt;1.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;com.test.project.data&lt;/groupId&gt;
  &lt;artifactId&gt;data-test-project&lt;/artifactId&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  
  &lt;parent&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
      &lt;version&gt;2.7.2&lt;/version&gt;
  &lt;/parent&gt;
  
  &lt;properties&gt;
      &lt;java.version&gt;11&lt;/java.version&gt;
      &lt;formatter-file.location&gt;${project.basedir}/formatter/eclipse-formatter-config.xml&lt;/formatter-file.location&gt;
      &lt;testcontainers.version&gt;1.10.6&lt;/testcontainers.version&gt;
  &lt;/properties&gt;
  
  &lt;dependencies&gt;
      &lt;!-- Spring dependencies --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.hateoas&lt;/groupId&gt;
          &lt;artifactId&gt;spring-hateoas&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-actuator&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-configuration-processor&lt;/artifactId&gt;
          &lt;optional&gt;true&lt;/optional&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
          &lt;artifactId&gt;commons-lang3&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.projectlombok&lt;/groupId&gt;
          &lt;artifactId&gt;lombok&lt;/artifactId&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
          &lt;artifactId&gt;spring-cloud-stream&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-webflux&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.mapstruct&lt;/groupId&gt;
          &lt;artifactId&gt;mapstruct&lt;/artifactId&gt;
          &lt;version&gt;${org.mapstruct.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.mapstruct&lt;/groupId&gt;
          &lt;artifactId&gt;mapstruct-processor&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-devtools&lt;/artifactId&gt;
          &lt;optional&gt;true&lt;/optional&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;!-- Security Dependencies --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
          &lt;artifactId&gt;spring-security-oauth2-client&lt;/artifactId&gt;
      &lt;/dependency&gt;
  
      &lt;!-- Test dependencies --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.junit.jupiter&lt;/groupId&gt;
          &lt;artifactId&gt;junit-jupiter&lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.restdocs&lt;/groupId&gt;
          &lt;artifactId&gt;spring-restdocs-mockmvc&lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
          &lt;artifactId&gt;
              spring-cloud-starter-contract-stub-runner
          &lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
          &lt;artifactId&gt;spring-cloud-contract-wiremock&lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
          &lt;artifactId&gt;spring-security-test&lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
          &lt;exclusions&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;junit&lt;/groupId&gt;
                  &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;/exclusion&gt;
          &lt;/exclusions&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
          &lt;artifactId&gt;spring-cloud-stream-test-support&lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.testcontainers&lt;/groupId&gt;
          &lt;artifactId&gt;testcontainers&lt;/artifactId&gt;
          &lt;version&gt;${testcontainers.version}&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;io.projectreactor&lt;/groupId&gt;
          &lt;artifactId&gt;reactor-test&lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  
  
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;com.marvinformatics.formatter&lt;/groupId&gt;
              &lt;artifactId&gt;formatter-maven-plugin&lt;/artifactId&gt;
              &lt;configuration&gt;
                  &lt;configFile&gt;${formatter-file.location}&lt;/configFile&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.pitest&lt;/groupId&gt;
              &lt;artifactId&gt;pitest-maven&lt;/artifactId&gt;
              &lt;configuration&gt;
                  &lt;threads&gt;8&lt;/threads&gt;
                  &lt;coverageThreshold&gt;73&lt;/coverageThreshold&gt;
                  &lt;failWhenNoMutations&gt;true&lt;/failWhenNoMutations&gt;
                  &lt;mutationThreshold&gt;68&lt;/mutationThreshold&gt;
                  &lt;excludedMethods&gt;
                      &lt;excludedMethod&gt;hashCode&lt;/excludedMethod&gt;
                      &lt;excludedMethod&gt;toString&lt;/excludedMethod&gt;
                      &lt;excludedMethod&gt;equals&lt;/excludedMethod&gt;
                  &lt;/excludedMethods&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p>Here is my DataClientTest class:</p>
  <pre><code>class DataClientTest {
    
          private DataClient dataClient;
      
          private ObjectMapper mapper;
          private WireMockServer wireMockServer;
      
          @BeforeEach
          void setup() {
              final DataProcessorProperties properties = new DataProcessorProperties ();
              properties.getData().setUrl(&quot;http://localhost:8080&quot;);
              mapper = new ObjectMapper();
              mapper.findAndRegisterModules();
              wireMockServer = new WireMockServer(8080);
              wireMockServer.start();
              statDataClient = new DataClient(WebClient.builder().baseUrl(&quot;http://localhost:8080&quot;), properties);
      
          }
      
          @AfterEach
          void shutdown() {
              wireMockServer.stop();
          }
      
          @Test
          void testGetData() throws Exception {
      
              final String jsonRecord = mapper.writeValueAsString(sampleData());
              wireMockServer.addStubMapping(get(urlPathMatching(&quot;/v1/data&quot;))
                      .withHeader(HttpHeaders.ACCEPT, equalTo(&quot;application/json&quot;))
                      .willReturn(okJson(jsonRecord).withHeader(HttpHeaders.CONTENT_TYPE, &quot;application/json&quot;))
                      .withQueryParam(&quot;id&quot;, equalTo(&quot;123456789&quot;)).build());
      
              final Optional&lt;List&lt;ReportData&gt;&gt; result = this.dataClient
                      .getRecordData(123456789);
      
              wireMockServer.verify(getRequestedFor(WireMock.urlPathEqualTo(&quot;/v1/data&quot;))
                      .withHeader(&quot;Accept&quot;, equalTo(&quot;application/json&quot;)).withQueryParam(&quot;id&quot;, equalTo(&quot;123456789&quot;)));
      
              assertThat(result.isPresent()).isTrue();
              assertThat(result.get().size()).isEqualTo(2);
          }
  }
  </code></pre>
  <p>The part where the error is pointing is at this line:</p>
  <pre><code>DataClient(WebClient.builder().baseUrl(&quot;http://localhost:8080&quot;), properties);
  </code></pre>
  <p>Do I need to add or update something from my pom.xml? Thanks!</p>