SolrServer.commit() 拋出 500 Server Error 的 RumtimeException
Posted on April 9th, 2014
Client 透過 SolrServer.commit() 將資料送到Solr Server 時,
若拋出 500 Server Error 的 RumtimeException,
但資料卻有正常存入 Solrm,
可能就是 web.xml 的 Filter 先後順序的問題,
Solr 希望 SolrDispatchFilter 可以優先被處裡,
故將以下 filter 放到最前面即可
----
### 以下為 Server Error 時, Server 端的錯誤訊息
> 10047764 [qtp2912633-15] ERROR
> org.apache.solr.servlet.SolrDispatchFilter - null:
> org.apache.solr.common.SolrException:
> Solr requires that request parameters sent using application/x-www-form-urlencoded content-type can be read through therequest input stream.
> org.apache.solr.servlet.SolrDispatchFilter - null:
> org.apache.solr.common.SolrException:
> Solr requires that request parameters sent using application/x-www-form-urlencoded content-type can be read through therequest input stream.
> Unfortunately, the stream was empty / not available.
> This may be caused by another servlet filter calling ServletRequest.getParameter*() before SolrDispatchFilter, please remove it.
> This may be caused by another servlet filter calling ServletRequest.getParameter*() before SolrDispatchFilter, please remove it.