title: java.lang.NoClassDefFoundError: io/cucumber/core/runtime/TypeRegistryConfigurerSupplier
body: <p>I am getting the 'java.lang.ClassNotFoundException' exception while running maven test in my project. The same program works fine if @RunWith is tagged to (Cucumber.class) but apparently not with @Runwith(CucumberWithSerenity.class). I am not sure why issue is appearing!</p>
  <p>Note: I did refer the similar post to rectify the issue but apparently none helped me yet.</p>
  <p><strong>Error logs:</strong></p>
  <pre><code>[INFO] -------------------------------------------------------
  [INFO]  T E S T S
  [INFO] -------------------------------------------------------
  [INFO] Running foo.boo.TestRunner
  [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.049 s &lt;&lt;&lt; FAILURE! - in foo.boo.TestRunner
  [ERROR] foo.boo.TestRunner.initializationError  Time elapsed: 0.008 s  &lt;&lt;&lt; ERROR!
  java.lang.NoClassDefFoundError: io/cucumber/core/runtime/TypeRegistryConfigurerSupplier
  Caused by: java.lang.ClassNotFoundException: io.cucumber.core.runtime.TypeRegistryConfigurerSupplier
  [ERROR]   TestRunner.initializationError » NoClassDefFound io/cucumber/core/runtime/Type...
  [INFO] 
  [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
  </code></pre>
  <p><strong>TestRunner.java</strong></p>
  <pre><code>package foo.boo;
  import io.cucumber.junit.CucumberOptions;
  import net.serenitybdd.cucumber.CucumberWithSerenity;
  import org.junit.runner.RunWith;
  
  @RunWith(CucumberWithSerenity.class)
  @CucumberOptions(
          plugin = {&quot;pretty&quot;},
          features = &quot;foo&quot;,
          glue = &quot;boo&quot;
  )
  
  public class TestRunner {
  }
  </code></pre>
  <p><strong>POM.XML:-</strong></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/xsd/maven-4.0.0.xsd&quot;&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;fooboo&lt;/groupId&gt;
      &lt;artifactId&gt;Experiment&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  
      &lt;properties&gt;
          &lt;maven.compiler.source&gt;8&lt;/maven.compiler.source&gt;
          &lt;maven.compiler.target&gt;8&lt;/maven.compiler.target&gt;
      &lt;/properties&gt;
  
      &lt;build&gt;
          &lt;sourceDirectory&gt;${project.basedir}&lt;/sourceDirectory&gt;
          &lt;testSourceDirectory&gt;${project.basedir}&lt;/testSourceDirectory&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.0.0-M5&lt;/version&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;version&gt;3.8.1&lt;/version&gt;
              &lt;type&gt;maven-plugin&lt;/type&gt;
          &lt;/dependency&gt;
  
          &lt;!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-java --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.cucumber&lt;/groupId&gt;
              &lt;artifactId&gt;cucumber-java&lt;/artifactId&gt;
              &lt;version&gt;7.0.0&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;4.13.2&lt;/version&gt;
              &lt;scope&gt;compile&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;io.cucumber&lt;/groupId&gt;
              &lt;artifactId&gt;cucumber-junit&lt;/artifactId&gt;
              &lt;version&gt;7.0.0&lt;/version&gt;
              &lt;scope&gt;compile&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- https://mvnrepository.com/artifact/info.cukes/cucumber-core --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;info.cukes&lt;/groupId&gt;
              &lt;artifactId&gt;cucumber-core&lt;/artifactId&gt;
              &lt;version&gt;1.2.6&lt;/version&gt;
              &lt;type&gt;pom&lt;/type&gt;
          &lt;/dependency&gt;
  
          &lt;!-- https://mvnrepository.com/artifact/org.json/json --&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;dependency&gt;
              &lt;groupId&gt;io.rest-assured&lt;/groupId&gt;
              &lt;artifactId&gt;rest-assured&lt;/artifactId&gt;
              &lt;version&gt;4.4.0&lt;/version&gt;
              &lt;scope&gt;compile&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;!-- https://mvnrepository.com/artifact/org.yaml/snakeyaml --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.yaml&lt;/groupId&gt;
              &lt;artifactId&gt;snakeyaml&lt;/artifactId&gt;
              &lt;version&gt;1.29&lt;/version&gt;
          &lt;/dependency&gt;
  
  
          &lt;!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
              &lt;artifactId&gt;selenium-java&lt;/artifactId&gt;
              &lt;version&gt;4.0.0&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- https://mvnrepository.com/artifact/net.serenity-bdd/serenity-core --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;net.serenity-bdd&lt;/groupId&gt;
              &lt;artifactId&gt;serenity-core&lt;/artifactId&gt;
              &lt;version&gt;3.1.10&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- https://mvnrepository.com/artifact/net.serenity-bdd/serenity-ensure --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;net.serenity-bdd&lt;/groupId&gt;
              &lt;artifactId&gt;serenity-ensure&lt;/artifactId&gt;
              &lt;version&gt;3.1.10&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- https://mvnrepository.com/artifact/net.serenity-bdd/serenity-cucumber --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;net.serenity-bdd&lt;/groupId&gt;
              &lt;artifactId&gt;serenity-cucumber&lt;/artifactId&gt;
              &lt;version&gt;3.1.10&lt;/version&gt;
          &lt;/dependency&gt;
  
  
          &lt;dependency&gt;
              &lt;groupId&gt;net.serenity-bdd&lt;/groupId&gt;
              &lt;artifactId&gt;serenity-junit&lt;/artifactId&gt;
              &lt;version&gt;3.1.10&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  <p>Could someone share what is causing such issues?</p>