title: NoClassDefFoundError: org/apache/commons/configuration/ConfigurationException
body: <p>I have an app in which I need to parse configuration file and when run this program on server it gives the following trace:</p>
  
  <pre><code>java.lang.NoClassDefFoundError: org/apache/commons/configuration/ConfigurationException
      at com.messagedna.server.startup.StartupServlet.init(StartupServlet.java:19)
      at javax.servlet.GenericServlet.init(GenericServlet.java:160)
      at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1274)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1186)
      at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1081)
      at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5033)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5320)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
      at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1553)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
      at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:791)
      at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:622)
      at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:569)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
      at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:791)
      at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1486)
      at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:96)
      at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1327)
      at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1419)
      at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:847)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
      at sun.rmi.transport.Transport$1.run(Transport.java:177)
      at sun.rmi.transport.Transport$1.run(Transport.java:174)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:722)
  Caused by: java.lang.ClassNotFoundException: org.apache.commons.configuration.ConfigurationException
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
      ... 48 more
  </code></pre>
  
  <p>apache commons <strong>exists</strong> in my classpath. it is. and nevertheless I have such a problem. </p>
  
  <p>in firebug in firefox I see the following trace in tomcat log:</p>
  
  <pre><code>&lt;b&gt;exception&lt;/b&gt; &lt;pre&gt;java.lang.NoClassDefFoundError: com/google/gwt/user/client/rpc/RemoteService
      java.lang.ClassLoader.defineClass1(Native Method)
      java.lang.ClassLoader.defineClass(ClassLoader.java:791)
      java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
      org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2904)
      org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1173)
      org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1681)
      org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
      java.lang.ClassLoader.defineClass1(Native Method)
      java.lang.ClassLoader.defineClass(ClassLoader.java:791)
      java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
      org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2904)
      org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1173)
      org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1681)
      org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
      org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:461)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
      org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
      org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
      org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
      org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
      java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      java.lang.Thread.run(Thread.java:722)
  </code></pre>
  
  <p>Actually I'm not shure this two exceptions have the same reasons.
  I'll be very grateful if somebody can advise me the way of solution of such problems</p>
  
  <p><strong>UPD:</strong> here is my pom.xml file:</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;parent&gt;
          &lt;artifactId&gt;DLP&lt;/artifactId&gt;
          &lt;groupId&gt;com.messagedna.dlp&lt;/groupId&gt;
          &lt;version&gt;1.0&lt;/version&gt;
      &lt;/parent&gt;
    &lt;groupId&gt;com.messagedna.dlp&lt;/groupId&gt;
    &lt;artifactId&gt;DLPServer&lt;/artifactId&gt;
    &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
    &lt;packaging&gt;jar&lt;/packaging&gt;
  
    &lt;name&gt;DLPServer&lt;/name&gt;
    &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  
    &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
    &lt;/properties&gt;
  
    &lt;dependencies&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;com.google.gwt&lt;/groupId&gt;
            &lt;artifactId&gt;gwt-servlet&lt;/artifactId&gt;
            &lt;version&gt;2.0.3&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;com.google.gwt&lt;/groupId&gt;
            &lt;artifactId&gt;gwt-user&lt;/artifactId&gt;
            &lt;version&gt;2.0.3&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;com.extjs&lt;/groupId&gt;
            &lt;artifactId&gt;gxt&lt;/artifactId&gt;
            &lt;version&gt;2.2.0&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;commons-configuration&lt;/groupId&gt;
            &lt;artifactId&gt;commons-configuration&lt;/artifactId&gt;
            &lt;version&gt;1.9&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;javax.mail&lt;/groupId&gt;
            &lt;artifactId&gt;mail&lt;/artifactId&gt;
            &lt;version&gt;1.4.5&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.apache.james&lt;/groupId&gt;
            &lt;artifactId&gt;apache-mime4j&lt;/artifactId&gt;
            &lt;version&gt;0.6.1&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.apache.tika&lt;/groupId&gt;
            &lt;artifactId&gt;tika-parsers&lt;/artifactId&gt;
            &lt;version&gt;1.2&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;net.freeutils.jtnef&lt;/groupId&gt;
            &lt;artifactId&gt;tnef&lt;/artifactId&gt;
            &lt;version&gt;1.5.0&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;com.messagedna-archive.mimeparser&lt;/groupId&gt;
            &lt;artifactId&gt;MimeParser&lt;/artifactId&gt;
            &lt;version&gt;1.0&lt;/version&gt;
        &lt;/dependency&gt;
  
        &lt;dependency&gt;
            &lt;groupId&gt;com.rabbitmq&lt;/groupId&gt;
            &lt;artifactId&gt;amqp-client&lt;/artifactId&gt;
            &lt;version&gt;3.0.4&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;commons-lang&lt;/groupId&gt;
            &lt;artifactId&gt;commons-lang&lt;/artifactId&gt;
            &lt;version&gt;2.3&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.jboss.resteasy&lt;/groupId&gt;
            &lt;artifactId&gt;resteasy-jaxrs&lt;/artifactId&gt;
            &lt;version&gt;2.3.4.Final&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.jboss.resteasy&lt;/groupId&gt;
            &lt;artifactId&gt;resteasy-jaxb-provider&lt;/artifactId&gt;
            &lt;version&gt;2.3.4.Final&lt;/version&gt;
        &lt;/dependency&gt;
  
        &lt;dependency&gt;
            &lt;groupId&gt;junit&lt;/groupId&gt;
            &lt;artifactId&gt;junit&lt;/artifactId&gt;
            &lt;version&gt;4.10&lt;/version&gt;
            &lt;scope&gt;test&lt;/scope&gt;
        &lt;/dependency&gt;
    &lt;/dependencies&gt;
    &lt;build&gt;
          &lt;outputDirectory&gt;war/WEB-INF/classes&lt;/outputDirectory&gt;
          &lt;plugins&gt;
                &lt;plugin&gt;
                    &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
                    &lt;artifactId&gt;gwt-maven-plugin&lt;/artifactId&gt;
                    &lt;version&gt;1.2&lt;/version&gt;
                    &lt;executions&gt;
                        &lt;execution&gt;
                            &lt;goals&gt;
                                &lt;goal&gt;compile&lt;/goal&gt;
                                &lt;goal&gt;generateAsync&lt;/goal&gt;
                                &lt;goal&gt;test&lt;/goal&gt;
                            &lt;/goals&gt;
                        &lt;/execution&gt;
                    &lt;/executions&gt;
                    &lt;configuration&gt;
                        &lt;runTarget&gt;Main.html&lt;/runTarget&gt;
                        &lt;style&gt;OBFUSCATED&lt;/style&gt;
                        &lt;extraJvmArgs&gt;-Xmx1024m -Xss1024k&lt;/extraJvmArgs&gt;
                        &lt;webappDirectory&gt;war&lt;/webappDirectory&gt;
                    &lt;/configuration&gt;
                &lt;/plugin&gt;
  
                &lt;plugin&gt;
                    &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                    &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
                    &lt;version&gt;2.1.1&lt;/version&gt;
                    &lt;configuration&gt;
                        &lt;webappDirectory&gt;war&lt;/webappDirectory&gt;
                        &lt;warSourceExcludes&gt;.gwt-tmp/**&lt;/warSourceExcludes&gt;
                    &lt;/configuration&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.0&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.6&lt;/source&gt;
                      &lt;target&gt;1.6&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
    &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>