title: java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.encodeBase64String() in Java EE application
body: <p>I am developing a Java EE application in which I need Base64 Encoding/Decoding</p>
  
  <p>So I added <code>commons-codec-1.5.jar</code> in <code>WEB-INF/lib</code> folder of my application and used </p>
  
  <pre><code>import org.apache.commons.codec.binary.Base64;
  </code></pre>
  
  <p>in the Java file.</p>
  
  <p>During compile time, when I type <code>Base64</code>, it shows <code>encodeBase64String</code> method is available. But during runtime it is throwing an exception like this:</p>
  
  <pre><code>java.lang.NoSuchMethodError:org.apache.commons.codec.binary.Base64.encodeBase64String
  </code></pre>
  
  <p>I have the JAR in the buildpath, but still I don't understand why it throws me the above error.</p>