lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven White <swhite4...@gmail.com>
Subject Re: HTTP Error 500 on "/admin/ping" request
Date Mon, 03 Aug 2015 19:08:55 GMT
I found the issue.  With GET, the legacy code I'm calling into was written
like so:

    clientResponse =
resource.contentType("application/atom+xml").accept("application/atom+xml").get();

This is a bug, and should have been:

    clientResponse = resource.accept("application/atom+xml").get();

Google'ing on the issue helped me narrow it down.  Looks like others run
into it moving from Solr 5.0 to 5.1 [1] [2].

Steve

[1]
http://lucene.472066.n3.nabble.com/Bad-contentType-for-search-handler-text-xml-charset-UTF-8-td4200314.html
[2] https://github.com/solariumphp/solarium/issues/326


On Mon, Aug 3, 2015 at 2:16 PM, Steven White <swhite4141@gmail.com> wrote:

> Yes, my application is in Java, no I cannot switch to SolrJ because I'm
> working off legacy code for which I don't have the luxury to refactor..
>
> If my application is sending the wrong Content-Type HTTP header, which
> part is it and why the same header is working for the other query paths
> such as: "/solr/db/config/requestHandler?wt=xml" or
> "/solr/db/schema/fieldtypes/?wt=xml" or "/solr/db/schema/fields/?wt=xml" ?
>
> Steve
>
> On Mon, Aug 3, 2015 at 2:10 PM, Shawn Heisey <apache@elyograg.org> wrote:
>
>> On 8/3/2015 11:34 AM, Steven White wrote:
>> > Hi Everyone,
>> >
>> > I cannot figure out why I'm getting HTTP Error 500 off the following
>> code:
>>
>> <snip>
>>
>> > Ping query caused exception: Bad contentType for search handler
>> > :application/atom+xml
>>
>> Your application is sending an incorrect Content-Type HTTP header that
>> Solr doesn't know how to handle.
>>
>> If your application is Java, why are you not using SolrJ?  You'll likely
>> find that to be a lot easier to use than even a REST client.
>>
>> Thanks,
>> Shawn
>>
>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message