title: how to fix org.jboss.as.server.deployment.DeploymentUnitProcessingException?
body: <p>I encounter this exception when I'm adding a servlet and servlet-mapping fields on my web.xml then deploy the project using jboss.</p>
  
  <p>How should I fix this?</p>
  
  <p>Here is the full stacktrace</p>
  
  <pre><code>11:46:15,723 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.unit."Servlet.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."Servlet.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "Servlet.war"    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]   at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_79]    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79]    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]
  
  Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011093: Could not load component class Hello   at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:113)   at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:54)    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]   ... 5 more
  
  Caused by: java.lang.ClassNotFoundException: Hello from [Module "deployment.Servlet.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.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:111)   ... 7 more
  
  11:46:15,733 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "Servlet.war" was rolled back with failure message {"JBAS014671: Failed services" =&gt; {"jboss.deployment.unit.\"Servlet.war\".POST_MODULE" =&gt; "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"Servlet.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"Servlet.war\""}} 11:46:15,734 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report JBAS014777:   Services which failed to start:    service jboss.deployment.unit."Servlet.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."Servlet.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "Servlet.war"
  
  11:46:15,737 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" =&gt; {"Operation step-2"
  =&gt; {"JBAS014671: Failed services" =&gt; {"jboss.deployment.unit.\"Servlet.war\".POST_MODULE" =&gt; "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"Servlet.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"Servlet.war\""}}}} 11:46:15,741 INFO [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015877: Stopped deployment Servlet.war in 5ms
  </code></pre>
  
  <p>Here is my project directory structure</p>
  
  <p><a href="https://i.stack.imgur.com/D3OI0.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/D3OI0.jpg" alt="Project directory structure"></a></p>
  
  <p>Here is my web.xml</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns="http://java.sun.com/xml/ns/javaee"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
      id="WebApp_ID" version="3.0"&gt;
      &lt;display-name&gt;Servlet&lt;/display-name&gt;
  
      &lt;servlet&gt;
          &lt;servlet-name&gt;MyFirstServlet&lt;/servlet-name&gt;
          &lt;servlet-class&gt;Hello&lt;/servlet-class&gt;
      &lt;/servlet&gt;
  
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;MyFirstServlet&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/Hello&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  
      &lt;welcome-file-list&gt;
          &lt;welcome-file&gt;test.html&lt;/welcome-file&gt;
      &lt;/welcome-file-list&gt;
  &lt;/web-app&gt;
  </code></pre>