title: java.lang.NoClassDefFoundError: org/apache/solr/client/solrj/impl/HttpSolrServer
body: <p>I am trying to perform query from my servlet to solr using solrj, however i am facing problem, apparently HttpSolrServer class is not found and i dont know why. Below is my servlet code</p>
  
  <pre><code>protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
      // TODO Auto-generated method stub
  
        HttpSolrServer server = new HttpSolrServer("http://localhost:8983/solr");
          SolrQuery query = new SolrQuery();
          QueryResponse QueryResponse;
          try {
          QueryResponse = server.query(query);
           SolrDocumentList results = QueryResponse.getResults();
           System.out.println("hello2");
            for (int i = 0; i &lt; results.size(); ++i) {
              System.out.println(results.get(i));
  
            }
      } catch (SolrServerException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
  
  }
  </code></pre>
  
  <p>Thanks in advance</p>