title: Solr : Server at http://localhost:8080//solr returned non ok status:500, message:Internal Server Error
body: <p>I keep getting this <code>error "Server at solr 8080 returned non ok status:500, message:Internal Server Error"</code> when I am trying to index text files on solr server using solrj api.</p>
  
  <p>My code is as follows:</p>
  
  <pre><code>public void IndexData(String filePath,String solrId)
  {
          try {
  
              String urlString = "http://localhost:8080//solr";
              HttpSolrServer  server  = new HttpSolrServer(urlString);
  
  
              ContentStreamUpdateRequest up 
                = new ContentStreamUpdateRequest("/update/extract");
  
              up.addFile(new File(filePath),"");
  
              up.setParam("literal.id", solrId);
              up.setParam("uprefix", "attr_");
              up.setParam("fmap.content", "attr_content");
  
              up.setAction(AbstractUpdateRequest.ACTION.COMMIT,                     true,true);
  
              server.request(up);
          } catch (IOException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          } catch (SolrServerException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          } catch (Exception e) {
              // TODO: handle exception
              e.printStackTrace();
          }
  
  }
  </code></pre>
  
  <p>I am able to query the solr server using same server but while indexing data, why I am getting this error?</p>
  
  <pre><code>log4j:WARN No appenders could be found for logger (org.apache.solr.client.solrj.impl.HttpClientUtil).
  log4j:WARN Please initialize the log4j system properly.
  org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Server at `http://localhost:8080//solr` returned non ok status:500, message:Internal Server Error
      at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:372)
      at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:180)
      at dataAnalysis.dataIndexer.DataIndexer.IndexData(DataIndexer.java:41)
      at dataAnalysis.dataHome.DataHome.main(DataHome.java:13)
  </code></pre>