lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hans-Peter Stricker" <stric...@epublius.de>
Subject A strange RemoteSolrException
Date Mon, 27 May 2013 11:44:03 GMT
Hello,

I'm writing my first little Solrj program, but don't get it running because of an RemoteSolrException:
Server at http://localhost:8983/solr returned non ok status:404

The server is definitely running and the url works in the browser.

I am working with Solr 4.3.0.

This is my source code:

public static void main(String[] args) {

        String url = "http://localhost:8983/solr";
        SolrServer server;
        
        try {
            server = new HttpSolrServer(url);
            server.ping();
       } catch (Exception ex) {
            ex.printStackTrace();
       }
}

with the stack trace:

org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Server at http://localhost:8983/solr
returned non ok status:404, message:Not Found
 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 org.apache.solr.client.solrj.request.SolrPing.process(SolrPing.java:62)
 at org.apache.solr.client.solrj.SolrServer.ping(SolrServer.java:293)
 at de.epublius.blogindexer.App.main(App.java:47)

If I call server.shutdown(), there is no such exception, but for almost all other SolrServer-methods.

What am I doing wrong?

Thanks in advance

Hans-Peter
Mime
View raw message