Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Orbit » Error 404 When Accessing Solr From Eclipse
Error 404 When Accessing Solr From Eclipse [message #1781548] Thu, 08 February 2018 11:45
amar bl is currently offline amar blFriend
Messages: 1
Registered: February 2018
Junior Member
Hi,

I am using solr-6.4.0. I am able to install Solr, create a collection named "core1", index files using post command and also able to search for data from Solr through browser instance. I was using the following URL to access Solr: http://localhost:8983/solr/core1. Now when I am trying to access the above URL through eclipse, it gives the following error:

[main] ERROR SolrQuery - Generic Exception : Server at http://localhost:8983/solr was not found (404).

org.apache.solr.client.solrj.SolrServerException: Server at http://localhost:8983/solr was not found (404).

at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:402)
at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:221)
at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:89)
at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:311)
at SolrDataDAO.queryData(SolrDataDAO.java:36)
at SolrQuery.testQueryData(SolrQuery.java:102)
at SolrQuery.main(SolrQuery.java:74)
Exception in thread "main" java.lang.NullPointerException

at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileWriter.<init>(Unknown Source)
at SolrQuery.main(SolrQuery.java:89)
here is the code I am running:

public HttpSolrServer getSolrConnection() throws Exception
{

HttpSolrServer solrServer = null;
try {
// configure a server object with actual solr values.
if (solrServer == null) {

solrServer = new HttpSolrServer("http://localhost:8983/solr/core1");
solrServer.setParser(new XMLResponseParser());
solrServer.setSoTimeout(5000);
solrServer.setConnectionTimeout(5000);
}

} catch (Exception exc) {
logger.error(" Exception in getting Solr Connection: "
+ exc.getMessage());
exc.printStackTrace();
}
return solrServer;
}
I used the same code with solr 4.5.0 and it was perfectly fine. but after upgradation its not working. please let me know what to update/include (jar files if any other). thanks

Thank you
Previous Topic:Upgrade to Apache Batik 1.9.0 in Oxygen Update?
Next Topic:Update library in Eclipse Orbit Repository
Goto Forum:
  


Current Time: Fri Apr 26 11:38:11 GMT 2024

Powered by FUDForum. Page generated in 0.02899 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top