title: HTTP Status 500 - Servlet execution threw an exception In tomcat7
body: <p>I'm trying to retrieve all elements in database and display in webpage.But now it was producing the error <code>HTTP Status 500 - Servlet execution threw an exception</code>. Can anyone tell me how to fix this error. Please help me.</p>
  
  <p>Stack Trace :</p>
  
  <pre><code>javax.servlet.ServletException: Servlet execution threw an exception
     root cause
  
  java.lang.NoClassDefFoundError: com/google/gson/JsonObject
  skypark.RetriveIm.doGet(RetriveIm.java:64)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    root cause
  
  java.lang.ClassNotFoundException: com.google.gson.JsonObject
  org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
  org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
  skypark.RetriveIm.doGet(RetriveIm.java:64)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:728)                                                           
  </code></pre>
  
  <p><strong>The complete source code is in <a href="https://stackoverflow.com/questions/14777159/retrieving-images-using-jquery-and-servlet-produces-http-status-500-error">this</a> question</strong></p>
  
  <p>This is the <code>#64</code> line <code>Gson gson=new Gson();</code>
  Please help me........Thanks....</p>