title: Why does my java program throw java.lang.NoSuchMethodError when using JDA in heroku?
body: <p>I have this java discord bot hosted on Heroku, after upgrading to latest version of JDA i had to change <code>onGuildMessageReceived</code> to <code>onMessageReceived</code>.
  When running my bot from intellij it works without any problem but when executing it from Heroku it gives me &quot;java.lang.NoSuchMethodError: 'net.dv8tion.jda.api.entities.AudioChannel net.dv8tion.jda.api.entities.GuildVoiceState.getChannel()&quot; every time I send a message on Discord.
  The code that causes this error is: <code>AudioChannel audioChannel = e.getMember().getVoiceState().getChannel();</code> inside of <code>onMessageReceived</code>.</p>
  <p>I personally feel that maven could be importing the wrong version to Heroku but I don't have any way to check it, so here it is my pom.xml:</p>
  <pre><code>&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;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;com.heroku.sdk&lt;/groupId&gt;
                  &lt;artifactId&gt;heroku-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.0.3&lt;/version&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.10.1&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;release&gt;17&lt;/release&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-shade-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.2.4&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;phase&gt;package&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;shade&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;transformers&gt;
                                  &lt;transformer implementation=&quot;org.apache.maven.plugins.shade.resource.ManifestResourceTransformer&quot;&gt;
                                      &lt;mainClass&gt;com.furetto126.furettobot.FurettoBot&lt;/mainClass&gt;
                                  &lt;/transformer&gt;
                              &lt;/transformers&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;com.furetto126.furettobot&lt;/groupId&gt;
      &lt;artifactId&gt;FurettoBot&lt;/artifactId&gt;
      &lt;version&gt;1.1&lt;/version&gt;
  
      &lt;properties&gt;
          &lt;maven.compiler.release&gt;17&lt;/maven.compiler.release&gt;
      &lt;/properties&gt;
  
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;dv8tion&lt;/id&gt;
              &lt;name&gt;m2-dv8tion&lt;/name&gt;
              &lt;url&gt;https://m2.dv8tion.net/releases&lt;/url&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;net.dv8tion&lt;/groupId&gt;
              &lt;artifactId&gt;JDA&lt;/artifactId&gt;
              &lt;version&gt;5.0.0-alpha.12&lt;/version&gt;
              &lt;scope&gt;compile&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.sedmelluq&lt;/groupId&gt;
              &lt;artifactId&gt;lavaplayer&lt;/artifactId&gt;
              &lt;version&gt;1.3.77&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>