title: How to solve IllegalStateException while loading the restful webapp in glassfish?
body: <p>I am trying to create a basic Hello world app using <a href="https://www.mkyong.com/webservices/jax-rs/jersey-hello-world-example/" rel="nofollow noreferrer">this link</a>.</p>
  
  <p>I have created everything as asked but I am getting below error: </p>
  
  <blockquote>
    <p>Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: java.lang.NoSuchMethodError: com.sun.research.ws.wadl.Response.getRepresentationOrFault()Ljava/util/Lis</p>
  </blockquote>
  
  <p>My <code>web.xml</code></p>
  
  <pre><code>&lt;web-app id="WebApp_ID" version="2.4"
           xmlns="http://java.sun.com/xml/ns/j2ee"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
          http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"&gt;
      &lt;display-name&gt;Restful Web Application&lt;/display-name&gt;
  
      &lt;servlet&gt;
          &lt;servlet-name&gt;jersey-serlvet&lt;/servlet-name&gt;
          &lt;servlet-class&gt;
              com.sun.jersey.spi.container.servlet.ServletContainer
          &lt;/servlet-class&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;com.sun.jersey.config.property.packages&lt;/param-name&gt;
              &lt;param-value&gt;com&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;jersey-serlvet&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/rest/*&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  
  &lt;/web-app&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/xny7Y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xny7Y.png" alt="my dir structure"></a></p>