title: error in simple RESTtful web service implementation
body: <p><strong>Softwares used</strong> :</p>
  <p>Java Version : &quot;1.7.0_21&quot;<br>
  Eclipse Version : Kepler<br>
  Application Server : wildfly-8.1.0.Final(with RESTeasy bundle)<br></p>
  <p><strong>My try</strong> :</p>
  <p>I want to implement REST web service. My resources is university.</p>
  <pre><code>package com.nagarro.university;
  
  import javax.ws.rs.ApplicationPath;
  import javax.ws.rs.GET;
  import javax.ws.rs.PUT;
  import javax.ws.rs.Path;
  import javax.ws.rs.PathParam;
  import javax.ws.rs.Produces;
  import javax.ws.rs.core.Application;
  import javax.ws.rs.core.MediaType;
  
  @ApplicationPath(&quot;/university&quot;)  //??? OR @Path(&quot;/university&quot;)???
  public class University extends Application{
  
      @GET
      @Produces(MediaType.TEXT_HTML)
      public String getHTMLUniversityInfo(){
          return &quot;&lt;html&gt; &quot;
                  + &quot;&lt;title&gt;&quot;
                  + &quot;University Information&quot;
                  + &quot;&lt;/title&gt;&quot;
                  + &quot;&lt;body&gt;&quot;
                  + &quot;&lt;h1&gt;&quot;
                  + &quot;NAME- IIIT&quot;
                  + &quot;&lt;/h1&gt;&quot;
                  + &quot;&lt;/body&gt;&quot;
                  + &quot;&lt;/html&gt;&quot;;
      }
  
      @GET
      @Produces(MediaType.TEXT_PLAIN)
      public String getXMLUniversityInfo() {
          return &quot;NAME-IIITA&quot;;
      }
  
      @PUT
      @Path(&quot;{studentRollNo}&quot;)
      @Produces(MediaType.TEXT_PLAIN)
      public String updateUniversityInfo(@PathParam(&quot;studentRollNo&quot;) String studentRollNo) {
  
          // CODE TO UPDATE STUDENT
          return &quot;Done SUccessfully!!!&quot;;
      }
  }
  </code></pre>
  <p><strong>web.xml</strong>  which I created after reading from sources: <a href="http://docs.jboss.org/tools/3.3.0.Final/en/resful_web_services_user_guide/html_single/" rel="nofollow noreferrer">[1]</a> <a href="http://www.mastertheboss.com/resteasy/resteasy-tutorial" rel="nofollow noreferrer">[2]</a> <a href="http://docs.jboss.org/resteasy/docs/3.0.1.Final/userguide/html/Installation_Configuration.html#d4e111" rel="nofollow noreferrer">[3]</a></p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;web-app xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
      xmlns=&quot;http://xmlns.jcp.org/xml/ns/javaee&quot;
      xsi:schemaLocation=&quot;http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd&quot;
      id=&quot;WebApp_ID&quot; version=&quot;3.1&quot;&gt;
      &lt;display-name&gt;UniversityRESTful-WS&lt;/display-name&gt;
  
      &lt;listener&gt;
          &lt;listener-class&gt;
              org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap
          &lt;/listener-class&gt;
      &lt;/listener&gt;
  
      &lt;servlet&gt;
          &lt;servlet-name&gt;Resteasy&lt;/servlet-name&gt;
          &lt;servlet-class&gt;org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher&lt;/servlet-class&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;javax.ws.rs.Application&lt;/param-name&gt;
              &lt;param-value&gt;com.nagarro.university.University&lt;/param-value&gt;
          &lt;/init-param&gt;
          &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
  
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;Resteasy&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
      
  &lt;/web-app&gt;
  </code></pre>
  <p>Now, I right click on my Project to &quot;Run on Server&quot; but following error comes as</p>
  <pre><code>19:12:23,467 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-10) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./UniversityRESTful-WS: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./UniversityRESTful-WS: Failed to start service
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_21]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_21]
      at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_21]
  Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: com.nagarro.university.University from [Module &quot;deployment.UniversityRESTful-WSEAR.ear.UniversityRESTful-WS.war:main&quot; from Service Module Loader]
      at org.jboss.resteasy.spi.ResteasyDeployment.createApplication(ResteasyDeployment.java:292)
      at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:95)
      at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36)
      at io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:214)
      at io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:119)
      at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:505)
      at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:88)
      at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:72)
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
      ... 3 more
  Caused by: java.lang.ClassNotFoundException: com.nagarro.university.University from [Module &quot;deployment.UniversityRESTful-WSEAR.ear.UniversityRESTful-WS.war:main&quot; from Service Module Loader]
      at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.3.Final]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.3.Final]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final]
      at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.3.Final]
      at org.jboss.resteasy.spi.ResteasyDeployment.createApplication(ResteasyDeployment.java:288)
      ... 12 more
  
  19:12:23,473 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation (&quot;deploy&quot;) failed - address: ([(&quot;deployment&quot; =&gt; &quot;UniversityRESTful-WSEAR.ear&quot;)]) - failure description: {&quot;JBAS014671: Failed services&quot; =&gt; {&quot;jboss.undertow.deployment.default-server.default-host./UniversityRESTful-WS&quot; =&gt; &quot;org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./UniversityRESTful-WS: Failed to start service
      Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: com.nagarro.university.University from [Module \&quot;deployment.UniversityRESTful-WSEAR.ear.UniversityRESTful-WS.war:main\&quot; from Service Module Loader]
      Caused by: java.lang.ClassNotFoundException: com.nagarro.university.University from [Module \&quot;deployment.UniversityRESTful-WSEAR.ear.UniversityRESTful-WS.war:main\&quot; from Service Module Loader]&quot;}}
  19:12:23,839 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 28) JBAS018559: Deployed &quot;UniversityRESTful-WSEAR.ear&quot; (runtime-name : &quot;UniversityRESTful-WSEAR.ear&quot;)
  19:12:23,840 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
  JBAS014777:   Services which failed to start:      service jboss.undertow.deployment.default-server.default-host./UniversityRESTful-WS: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./UniversityRESTful-WS: Failed to start service
  
  19:12:23,906 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management
  19:12:23,907 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
  19:12:23,907 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: WildFly 8.1.0.Final &quot;Kenny&quot; started (with errors) in 3239ms - Started 286 of 350 services (3 services failed or missing dependencies, 99 services are lazy, passive or on-demand)
  19:12:24,100 INFO  [org.hibernate.validator.internal.util.Version] (MSC service thread 1-5) HV000001: Hibernate Validator 5.1.0.Final
  19:12:24,143 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-9) JBAS015974: Stopped subdeployment (runtime-name: UniversityRESTful-WS.war) in 63ms
  19:12:24,144 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-9) JBAS015877: Stopped deployment UniversityRESTful-WSEAR.ear (runtime-name: UniversityRESTful-WSEAR.ear) in 65ms
  19:12:24,221 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018558: Undeployed &quot;UniversityRESTful-WSEAR.ear&quot; (runtime-name: &quot;UniversityRESTful-WSEAR.ear&quot;)
  19:12:24,224 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
  JBAS014775:    New missing/unsatisfied dependencies:
        service jboss.deployment.subunit.&quot;UniversityRESTful-WSEAR.ear&quot;.&quot;UniversityRESTful-WS.war&quot;.component.&quot;javax.faces.webapp.FacetTag&quot;.START (missing) dependents: [service jboss.deployment.subunit.&quot;UniversityRESTful-WSEAR.ear&quot;.&quot;UniversityRESTful-WS.war&quot;.deploymentCompleteService] 
        service jboss.deployment.subunit.&quot;UniversityRESTful-WSEAR.ear&quot;.&quot;UniversityRESTful-WS.war&quot;.component.&quot;javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV&quot;.START (missing) dependents: [service jboss.deployment.subunit.&quot;UniversityRESTful-WSEAR.ear&quot;.&quot;UniversityRESTful-WS.war&quot;.deploymentCompleteService] 
        service jboss.deployment.subunit.&quot;UniversityRESTful-WSEAR.ear&quot;.&quot;UniversityRESTful-WS.war&quot;.component.&quot;org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher&quot;.START (missing) dependents: [service jboss.deployment.subunit.&quot;UniversityRESTful-WSEAR.ear&quot;.&quot;UniversityRESTful-WS.war&quot;.deploymentCompleteService] 
        service jboss.deployment.subunit.&quot;UniversityRESTful-WSEAR.ear&quot;.&quot;UniversityRESTful-WS.war&quot;.deploymentCompleteService (missing) dependents: [service jboss.deployment.unit.&quot;UniversityRESTful-WSEAR.ear&quot;.deploymentCompleteService] 
        service jboss.undertow.deployment.default-server.default-host./UniversityRESTful-WS (missing) dependents: [service jboss.deployment.subunit.&quot;UniversityRESTful-WSEAR.ear&quot;.&quot;UniversityRESTful-WS.war&quot;.deploymentCompleteService] 
  JBAS014777:   Services which failed to start:      service jboss.undertow.deployment.default-server.default-host./UniversityRESTful-WS
  
  19:12:28,856 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) JBAS015003: Found UniversityRESTful-WSEAR.ear in deployment directory. To trigger deployment create a file called UniversityRESTful-WSEAR.ear.dodeploy
  </code></pre>
  <p>Why am I getting <code>ClassNotFoundException</code> error? Do I need to add any extra dependencies in my pom.xml(so far none added because RESTeasy states no extra dependencies requires to be added)?</p>