title: java.lang.NoClassDefFoundError: org/apache/commons/codec/DecoderException in JBoss AS 7
body: <p>I am testing JBoss AS 7 prior to deployment with a .war file of an app running in a different server.</p>
  
  <p>I get this error when I try to log onto the database via the app:</p>
  
  <pre><code>SEVERE [] (http--0.0.0.0-8080-4) java.lang.NoClassDefFoundError: org/apache/commons/codec/DecoderException
  java.lang.ClassNotFoundException: org.apache.commons.codec.DecoderException from [Module "deployment.app.war:main" from Service Module Loader]
        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
        at org.apache.commons.httpclient.HttpMethodBase.&lt;init&gt;(HttpMethodBase.java:220)
  </code></pre>
  
  <p>In some forums, they suggest adding the commons-codec jar, but I already have it in JBoss, right? (in here: <code>jboss-as-7.1.1.Final/modules/org/apache/commons/codec/main/commons-codec-1.4.jar</code>)</p>
  
  <p>OSGi is not activated, frankly I have no idea to what purpose it serves, but when I try to activate it it messes with my war as it fails to deploy...</p>
  
  <p>I have JDK, but no JRE if that's any help.</p>