You need to add the jar with that missing class to the startup command line.
Otis -- Performance Monitoring - http://sematext.com/spm On Oct 2, 2012 5:42 PM, "Rui Vaz" <rui....@gmail.com> wrote: > Hey I am trying to make a simple application using solrj to index > documents. > I used the start.jar to start the Solr,. When I try to index a document to > Solr > I get the following exception: > > Exception in thread "main" java.lang.NoClassDefFoundError: > org/apache/http/NoHttpResponseException > > The exception occurs when I instantiate SolrServer (in orange): > > > public static void indexFilesSolrCell(File srcFile, String solrId) > throws IOException, SolrServerException { > > String urlString = "http://localhost:8983/solr"; > > SolrServer solr = new HttpSolrServer(urlString); > > ContentStreamUpdateRequest up > = new ContentStreamUpdateRequest("/update/extract"); > > I already import apache solr-solrj > > Thank you, > -- > Rui Vaz >