title: java.lang.NoClassDefFoundError: org/telegram/telegrambots/meta/exceptions/TelegramApiException
body: <p>I'm trying to deploy my first java application using Maven. In this case, this is just a simply telegram bot, but I get this error when trying to run it locally. After a little investigation, I found that <strong>java.lang.NoClassDefFoundError</strong> is an error that occurs when a jar file is not able to access a specific class in runtime, and in order to solve this, is necessary to add that class on <em>classpath</em>.
  I understand that when working on Maven, there is a simple way to add classes on the classpath, and it's by adding the right dependency on the pom.xml file.
  So this is what i've added:</p>
  <pre><code>     &lt;dependencies&gt;
           &lt;dependency&gt;
               &lt;groupId&gt;org.telegram&lt;/groupId&gt;
               &lt;artifactId&gt;telegrambots-abilities&lt;/artifactId&gt;
               &lt;version&gt;5.0.1.1&lt;/version&gt;
           &lt;/dependency&gt;
           &lt;dependency&gt;
               &lt;groupId&gt;org.telegram&lt;/groupId&gt;
               &lt;artifactId&gt;telegrambots&lt;/artifactId&gt;
               &lt;version&gt;5.0.1&lt;/version&gt;
           &lt;/dependency&gt;
           &lt;dependency&gt;
               &lt;groupId&gt;org.telegram&lt;/groupId&gt;
               &lt;artifactId&gt;telegrambots-meta&lt;/artifactId&gt;
               &lt;version&gt;5.0.1.1&lt;/version&gt;
           &lt;/dependency&gt;
       &lt;/dependencies&gt;
  </code></pre>
  <p>And I think it was successfully added on the classpath because this is what I get when I read the MANIFEST.MF file on my jar file:</p>
  <pre><code>   Manifest-Version: 1.0
     Created-By: Apache Maven 3.6.3
     Built-By: agujared
     Build-Jdk: 15.0.1
     Class-Path: telegrambots-abilities-5.0.1.1.jar commons-lang3-3.11.jar ma
      pdb-3.0.8.jar kotlin-stdlib-1.2.71.jar kotlin-stdlib-common-1.2.71.jar
      annotations-13.0.jar eclipse-collections-api-11.0.0.M1.jar eclipse-coll
      ections-11.0.0.M1.jar eclipse-collections-forkjoin-11.0.0.M1.jar lz4-1.
      3.0.jar elsa-3.0.0-M5.jar slf4j-api-1.7.30.jar telegrambots-5.0.1.jar j
     ackson-annotations-2.11.3.jar jackson-jaxrs-json-provider-2.11.3.jar ja
     ckson-jaxrs-base-2.11.3.jar jackson-module-jaxb-annotations-2.11.3.jar
     jackson-core-2.11.3.jar jakarta.xml.bind-api-2.3.2.jar jakarta.activati
     on-api-1.2.1.jar jackson-databind-2.11.3.jar jersey-hk2-2.32.jar jersey
     -common-2.32.jar osgi-resource-locator-1.0.3.jar jakarta.activation-1.2
     .2.jar hk2-locator-2.6.1.jar aopalliance-repackaged-2.6.1.jar hk2-api-2
     .6.1.jar hk2-utils-2.6.1.jar javassist-3.25.0-GA.jar jersey-media-json-
     jackson-2.32.jar jersey-entity-filtering-2.32.jar jersey-container-griz
     zly2-http-2.32.jar jakarta.inject-2.6.1.jar grizzly-http-server-2.4.4.j
     ar grizzly-http-2.4.4.jar grizzly-framework-2.4.4.jar jakarta.ws.rs-api
     -2.1.6.jar jersey-server-2.32.jar jersey-client-2.32.jar jersey-media-j
     axb-2.32.jar jakarta.annotation-api-1.3.5.jar jakarta.validation-api-2.
     0.2.jar json-20180813.jar httpclient-4.5.13.jar httpcore-4.4.13.jar com
     mons-logging-1.2.jar commons-codec-1.11.jar httpmime-4.5.13.jar commons
     -io-2.8.0.jar telegrambots-meta-5.0.1.1.jar guava-30.0-jre.jar failurea
     ccess-1.0.1.jar listenablefuture-9999.0-empty-to-avoid-conflict-with-gu
     ava.jar jsr305-3.0.2.jar checker-qual-3.5.0.jar error_prone_annotations
     -2.3.4.jar j2objc-annotations-1.3.jar
    Main-Class: domain.Main
  </code></pre>
  <p>As you can see, <em>telegrambots-meta-5.0.1.1.jar</em> is part of the classpath attribute.
  How can I solve this?</p>
  <p>By the way, I'm using Heroku Cloud to deploy this</p>