title: java.lang.NoSuchMethodError: io.netty.buffer.PooledByteBufAllocator.metric()Lio/netty/buffer/PooledByteBufAllocatorMetric;
body: <p>I am trying to run a simple script with spark, and it is giving me </p>
  
  <blockquote>
    <p>java.lang.NoSuchMethodError: io.netty.buffer.PooledByteBufAllocator.metric()Lio/netty/buffer/PooledByteBufAllocatorMetric;</p>
  </blockquote>
  
  <p>I saw on this thread: <a href="https://stackoverflow.com/questions/49137397/spark-2-3-0-netty-version-issue-nosuchmethod-io-netty-buffer-pooledbytebufalloc">Spark 2.3.0 netty version issue: NoSuchMethod io.netty.buffer.PooledByteBufAllocator.metric()</a></p>
  
  <p>But even after I added the newer netty module to my pom.xml I am still seeing it. My pom.xml looks like this:</p>
  
  <pre><code> &lt;dependency&gt;
     &lt;groupId&gt;org.apache.spark&lt;/groupId&gt;
     &lt;artifactId&gt;spark-core_2.11&lt;/artifactId&gt;
     &lt;version&gt;2.3.0&lt;/version&gt;
   &lt;/dependency&gt;
   &lt;dependency&gt;
     &lt;groupId&gt;io.netty&lt;/groupId&gt;
     &lt;artifactId&gt;netty-all&lt;/artifactId&gt;
     &lt;version&gt;4.1.17.Final&lt;/version&gt;
   &lt;/dependency&gt;
  </code></pre>
  
  <p>I have also tried using spark 2.2.1, but that that gives me:</p>
  
  <blockquote>
    <p>java.lang.IllegalArgumentException: requirement failed: Can only call
    getServletHandlers on a running MetricsSystem</p>
  </blockquote>
  
  <p>So I am a bit stuck, is there any other configuration that I can try?</p>