On 11/6/2012 12:25 AM, Shawn Heisey wrote:
If I use this exact same code to talk to a Solr 3.5.0 server (older version of the SOLR-1972 patch applied) with the ping handler in the "enabled" state, I get the following exception. The /admin/ping handler works in a browser on both Solr versions:

Caused by: org.apache.solr.client.solrj.SolrServerException: Error executing query at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:98)
    at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:301)
    at com.newscom.common.solr.Core.ping(Core.java:396)
    ... 4 more
Caused by: java.lang.RuntimeException: Invalid version (expected 2, but 60) or the data in not in 'javabin' format at org.apache.solr.common.util.JavaBinCodec.unmarshal(JavaBinCodec.java:109) at org.apache.solr.client.solrj.impl.BinaryResponseParser.processResponse(BinaryResponseParser.java:41) at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:384) at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:181) at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:90)
    ... 6 more

No response in two days.  See original message for full details.

I grabbed the javabin response on 4.1-SNAPSHOT and on 3.5.0. Aside from the 4.1 version having a lot more data, I couldn't see a lot of difference between the two (examining in notepad, not a binary editor), but as I am unfamiliar with the javabin format, I cannot say.

My best guess at this point is that something in the 3.5.0 response, or the http headers sent with the response, makes SolrJ barf.

Right now I am treating an exception that contains the "Invalid version" message as a "no info" status. With the 4.1-SNAPSHOT server, I can reliably say "OK" instead. With both versions, I can detect the "Disabled" state.

Unless someone objects, I will be filing a bug against 3.5, though a workaround in the newer SolrJ would be welcome as well.

Thanks,
Shawn

Reply via email to