title: NoSuchMethodError: org.objectweb.asm.tree.ClassNode.<init>(I)V while using Parboiled
body: <p>I have the following program, which executes a parser. This is developed in grappa (a fork of parboiled)</p>
  
  <pre><code>package com.test;
  
  import org.parboiled.Parboiled;
  import org.parboiled.parserunners.BasicParseRunner;
  import org.parboiled.parserunners.ParseRunner;
  import org.parboiled.support.ParsingResult;
  
  public final class SampleRun
  {
          public static void main(final String... args)
          {
          // 1. create a parser
  
          final TestGrammar parser = Parboiled.createParser(TestGrammar.class);
          // 2. create a runner
          final ParseRunner&lt;String&gt; runner
          = new BasicParseRunner&lt;String&gt;(parser.oneLine());
          // 3. collect the result
  
          @SuppressWarnings("deprecation")
          final ParsingResult&lt;String&gt; result
          = runner.run("sno101 snamegowtham");
  
          // 4. success or not?
          System.out.println(result.isSuccess());
          }
  } 
  </code></pre>
  
  <p><strong>TestGrammar</strong></p>
  
  <pre><code>package com.test;
  
  import com.github.parboiled1.grappa.parsers.EventBusParser;
  import org.parboiled.Rule;
  import org.parboiled.support.Var;
  
  import java.util.HashMap;
  import java.util.Map;
  
  public class TestGrammar
      extends EventBusParser&lt;String&gt;
  {
      protected final Map&lt;String, String&gt; collectedValues
          = new HashMap&lt;String, String&gt;();
      protected final Var&lt;String&gt; var = new Var&lt;String&gt;();
  
      Rule key()
      {
          return sequence(
              firstOf(ignoreCase("sno"), ignoreCase("sname")),
              var.set(match().toLowerCase()),
              !collectedValues.containsKey(var.get())
          );
      }
  
      Rule separator()
      {
          return optional(anyOf(":-*_ "));
      }
  
      Rule value()
      {
          return sequence(
              oneOrMore(testNot(wsp()), ANY),
              collectedValues.put(var.get(), match()) == null
          );
      }
  
      Rule oneLine()
      {
          return join(sequence(key(), separator(), value()))
              .using(oneOrMore(wsp()))
              .min(2);
      }
  }
  </code></pre>
  
  <p>But, I am getting the following error when I try to execute the above program.</p>
  
  <pre><code>Exception in thread "main" java.lang.NoSuchMethodError: org.objectweb.asm.tree.ClassNode.&lt;init&gt;(I)V
      at org.parboiled.transform.ParserClassNode.&lt;init&gt;(ParserClassNode.java:50)
      at org.parboiled.transform.ParserTransformer.extendParserClass(ParserTransformer.java:93)
      at org.parboiled.transform.ParserTransformer.transformParser(ParserTransformer.java:63)
      at org.parboiled.Parboiled.createParser(Parboiled.java:64)
      at com.test.SampleRun.main(SampleRun.java:15)
  </code></pre>
  
  <p>I have the following <strong>maven dependencies</strong></p>
  
  <ol>
  <li>grappa-1.0.4.jar</li>
  <li>asm-debug-all-5.0.3.jar</li>
  <li>guava-18.0.jar</li>
  <li>jitescript-0.4.0.jar</li>
  </ol>
  
  <p>Here is my <strong>pom.xml</strong></p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;com.test&lt;/groupId&gt;
    &lt;artifactId&gt;parboiledprogram&lt;/artifactId&gt;
    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
    &lt;build&gt;
      &lt;sourceDirectory&gt;src&lt;/sourceDirectory&gt;
      &lt;plugins&gt;
        &lt;plugin&gt;
          &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
          &lt;version&gt;3.1&lt;/version&gt;
          &lt;configuration&gt;
            &lt;source&gt;1.7&lt;/source&gt;
            &lt;target&gt;1.7&lt;/target&gt;
          &lt;/configuration&gt;
        &lt;/plugin&gt;
      &lt;/plugins&gt;
    &lt;/build&gt;
    &lt;dependencies&gt;
        &lt;dependency&gt;
          &lt;groupId&gt;com.github.parboiled1&lt;/groupId&gt;
          &lt;artifactId&gt;grappa&lt;/artifactId&gt;
          &lt;version&gt;1.0.4&lt;/version&gt;
        &lt;/dependency&gt;
    &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Note: I am using <em>Eclipse Juno Service Release 2</em></p>
  
  <hr>
  
  <p><strong>Some attempts that didn't work</strong></p>
  
  <hr>
  
  <p>I have noticed the following icon for <code>asm-debug-all-5.0.3.jar</code>, I am not sure what this icon means in eclipse juno.</p>
  
  <p><img src="https://i.stack.imgur.com/Azs8J.png" alt="enter image description here"></p>
  
  <ol>
  <li><p>Also, in the <a href="https://repo1.maven.org/maven2/me/qmx/jitescript/jitescript/0.4.0/jitescript-0.4.0.pom" rel="nofollow noreferrer"><strong>pom.xml</strong></a> of the dependency <code>jitesscript-0.4.0.jar</code> I have noticed relocation of the <code>org.objectweb.asm</code> package. However, the classes in that too contain the <code>ClassNode(int)</code> <code>jitescript</code> was updated is on <strong>16-Apr-2014</strong> whereas <code>asm-debug-all-5.0.3</code> was on <strong>24-May-2014</strong></p></li>
  <li><p>I have tried to remove jitescript.jar and updated the maven project and also cleaned and build it but still no use.</p></li>
  <li><p>I have also tested this in KEPLER without using maven by manually including all the dependencies that are listed above. But still, I am getting the same error. This means that the problem was not with Maven but something else.</p></li>
  </ol>