Hi Everyone, I cannot figure out why I'm getting HTTP Error 500 off the following code:
// Using: org.apache.wink.client String contentType = "application/atom+xml"; URI uri = new URI("http://localhost:8983" + "/solr/db/admin/ping?wt=xml"); Resource resource = client.resource(uri.toURL().toString()); ClientResponse clientResponse = null; clientResponse = resource.contentType(contentType ).accept(contentType ).get(); clientResponse.getStatusCode(); // Gives back: 500 Here is the call stack I get back from the call (it's also the same in solr.log): ERROR - 2015-08-03 17:30:29.457; [ db] org.apache.solr.common.SolrException; org.apache.solr.common.SolrException: Bad contentType for search handler :application/atom+xml request={wt=xml&q=solrpingquery&echoParams=all&distrib=false} at org.apache.solr.request.json.RequestUtil.processParams(RequestUtil.java:74) at org.apache.solr.util.SolrPluginUtils.setDefaults(SolrPluginUtils.java:167) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:140) at org.apache.solr.core.SolrCore.execute(SolrCore.java:2064) at org.apache.solr.handler.PingRequestHandler.handlePing(PingRequestHandler.java:254) at org.apache.solr.handler.PingRequestHandler.handleRequestBody(PingRequestHandler.java:211) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:143) at org.apache.solr.core.SolrCore.execute(SolrCore.java:2064) at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:654) at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:450) INFO - 2015-08-03 17:30:29.459; [ db] org.apache.solr.core.SolrCore; [db] webapp=/solr path=/admin/ping params={wt=xml} status=400 QTime=6 ERROR - 2015-08-03 17:30:29.459; [ db] org.apache.solr.common.SolrException; org.apache.solr.common.SolrException: Ping query caused exception: Bad contentType for search handler :application/atom+xml request={wt=xml&q=solrpingquery&echoParams=all&distrib=false} at org.apache.solr.handler.PingRequestHandler.handlePing(PingRequestHandler.java:263) at org.apache.solr.handler.PingRequestHandler.handleRequestBody(PingRequestHandler.java:211) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:143) at org.apache.solr.core.SolrCore.execute(SolrCore.java:2064) at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:654) at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:450) at java.lang.Thread.run(Thread.java:853) Caused by: org.apache.solr.common.SolrException: Bad contentType for search handler :application/atom+xml request={wt=xml&q=solrpingquery&echoParams=all&distrib=false} at org.apache.solr.request.json.RequestUtil.processParams(RequestUtil.java:74) at org.apache.solr.util.SolrPluginUtils.setDefaults(SolrPluginUtils.java:167) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:140) at org.apache.solr.core.SolrCore.execute(SolrCore.java:2064) at org.apache.solr.handler.PingRequestHandler.handlePing(PingRequestHandler.java:254) ... 27 more INFO - 2015-08-03 17:30:29.461; [ db] org.apache.solr.core.SolrCore; [db] webapp=/solr path=/admin/ping params={wt=xml} status=500 QTime=8 ERROR - 2015-08-03 17:30:29.462; [ db] org.apache.solr.common.SolrException; null:org.apache.solr.common.SolrException: Ping query caused exception: Bad contentType for search handler :application/atom+xml request={wt=xml&q=solrpingquery&echoParams=all&distrib=false} at org.apache.solr.handler.PingRequestHandler.handlePing(PingRequestHandler.java:263) at org.apache.solr.handler.PingRequestHandler.handleRequestBody(PingRequestHandler.java:211) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:143) at org.apache.solr.core.SolrCore.execute(SolrCore.java:2064) at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:654) at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:450) If I use a browser plug-in Rest Client it works just fine. My Java code works with other paths such as "/solr/db/config/requestHandler?wt=xml" or "/solr/db/schema/fieldtypes/?wt=xml" or "/solr/db/schema/fields/?wt=xml". Yes, I did try other content types, the outcome is the same error. I'm using the default ping handler: <requestHandler name="/admin/ping" class="solr.PingRequestHandler"> <lst name="invariants"> <str name="q">solrpingquery</str> </lst> <lst name="defaults"> <str name="echoParams">all</str> </lst> </requestHandler> Any clues / pointers why "/admin/ping" doesn't work but other query paths do? Thanks Steve