title: Getting initialization error "NoClassDefFoundError: cucumber/runtime/io/URLOutputStream" after integrating cucumber.adapter.ExtentCucumberAdapter
body: <p><strong>Cucumber V. 4.2.3 | Selenium V.3.8.1 | JUnit V.4.12 | Extent Report V. 3.1.1</strong></p>
  
  <p><strong>I am facing error "java.lang.NoClassDefFoundError: cucumber/runtime/io/URLOutputStream" while integrating "com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:" under plugin in RunCuke</strong> Java file</p>
  
  <pre><code>package com.jacksparrow.automation.suite.runner;
  
  import org.junit.runner.RunWith;
  import cucumber.api.CucumberOptions;
  import cucumber.api.junit.Cucumber;
  
  @RunWith(Cucumber.class)
  @CucumberOptions(features = "classpath:features/functional/",
                       glue = {"com.jacksparrow.automation.steps_definitions.functional" },
                       tags = { "@guest_plp" },
                     plugin = { "pretty","json:target/cucumber-json/cucumber.json",
                                "junit:target/cucumber-reports/Cucumber.xml", "html:target/cucumber-reports",
                                "com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:"},
                     strict = false,
                     dryRun = false,
                 monochrome = true)
  
  public class FunctionalRunCuke {
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/iheHp.png" rel="nofollow noreferrer">Error Screen Shot from Eclipse</a></p>
  
  <p><strong>Trying to add extent cucumber adapter in POM.xml as given below -</strong> </p>
  
  <pre><code>    &lt;dependency&gt;
              &lt;groupId&gt;com.aventstack&lt;/groupId&gt;
              &lt;artifactId&gt;extentreports-cucumber4-adapter&lt;/artifactId&gt;
              &lt;version&gt;1.0.5&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.aventstack&lt;/groupId&gt;
              &lt;artifactId&gt;extentreports&lt;/artifactId&gt;
              &lt;version&gt;3.1.1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.vimalselvam&lt;/groupId&gt;
              &lt;artifactId&gt;cucumber-extentsreport&lt;/artifactId&gt;
              &lt;version&gt;3.1.1&lt;/version&gt;
          &lt;/dependency&gt;
  </code></pre>
  
  <p><strong>If I remove "extentreports-cucumber4-adapter" then i do not get compile time error mentioned below -</strong> </p>
  
  <pre><code>    java.lang.NoClassDefFoundError: cucumber/runtime/io/URLOutputStream
          at java.lang.Class.getDeclaredConstructors0(Native Method)
          at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
          at java.lang.Class.getConstructor0(Class.java:3075)
          at java.lang.Class.getConstructor(Class.java:1825)
          at cucumber.runtime.formatter.PluginFactory.findSingleArgConstructor(PluginFactory.java:141)
          at cucumber.runtime.formatter.PluginFactory.instantiate(PluginFactory.java:82)
          at cucumber.runtime.formatter.PluginFactory.create(PluginFactory.java:73)
          at cucumber.runtime.formatter.Plugins.createPlugins(Plugins.java:65)
          at cucumber.runtime.formatter.Plugins.&lt;init&gt;(Plugins.java:37)
          at cucumber.api.junit.Cucumber.&lt;init&gt;(Cucumber.java:94)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
          at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
          at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
          at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
          at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
          at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
          at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
          at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)
          at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createUnfilteredTest(JUnit4TestLoader.java:87)
          at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:73)
          at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:46)
          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:522)
          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:760)
          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:460)
          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:206)
      Caused by: java.lang.ClassNotFoundException: cucumber.runtime.io.URLOutputStream
          at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
          ... 27 more
  </code></pre>
  
  <p><strong>I have added below dependency in POM.xml</strong></p>
  
  <pre><code>&lt;!-- ********************************()() CUCUMBER &amp; SELENIUM DEPENDENCIES ()()******************************** --&gt; 
  
  &lt;dependency&gt;
      &lt;groupId&gt;io.cucumber&lt;/groupId&gt;
      &lt;artifactId&gt;cucumber-java&lt;/artifactId&gt;
      &lt;version&gt;4.2.3&lt;/version&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;4.2.3&lt;/version&gt;
      &lt;scope&gt;test&lt;/scope&gt;
  &lt;/dependency&gt;
  
  &lt;!-- https://mvnrepository.com/artifact/junit/junit --&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;junit&lt;/groupId&gt;
      &lt;artifactId&gt;junit&lt;/artifactId&gt;
      &lt;version&gt;4.12&lt;/version&gt;
      &lt;scope&gt;test&lt;/scope&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;io.cucumber&lt;/groupId&gt;
      &lt;artifactId&gt;datatable&lt;/artifactId&gt;
      &lt;version&gt;1.1.12&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;io.cucumber&lt;/groupId&gt;
      &lt;artifactId&gt;cucumber-testng&lt;/artifactId&gt;
      &lt;version&gt;4.2.3&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;io.cucumber&lt;/groupId&gt;
      &lt;artifactId&gt;cucumber-picocontainer&lt;/artifactId&gt;
      &lt;version&gt;4.2.3&lt;/version&gt;
      &lt;scope&gt;test&lt;/scope&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
      &lt;artifactId&gt;selenium-java&lt;/artifactId&gt;
      &lt;version&gt;3.8.1&lt;/version&gt;
  &lt;/dependency&gt;
  
      &lt;dependency&gt;
      &lt;groupId&gt;com.aventstack&lt;/groupId&gt;
      &lt;artifactId&gt;extentreports&lt;/artifactId&gt;
      &lt;version&gt;3.1.1&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;com.vimalselvam&lt;/groupId&gt;
      &lt;artifactId&gt;cucumber-extentsreport&lt;/artifactId&gt;
      &lt;version&gt;3.1.1&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;com.aventstack&lt;/groupId&gt;
      &lt;artifactId&gt;extentreports-cucumber4-adapter&lt;/artifactId&gt;
      &lt;version&gt;1.0.5&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>Have someone faced this issue before. Does Cucumber V 4.2.3 Support extentreports-cucumber4-adapter plugin. If so then any guess, what is wrong here which is causing this error.</p>