使用spring data solr从自定义存储库引用时,solrTemplate为null

时间:2015-06-30 15:44:13

标签: java solrj spring-data-solr

尝试实现自定义solr存储库并将solrTemplate(使用@Resource)注入自定义* Impl.java,但它为null并抛出异常。

尝试了所有选项,但徒劳无功。

    SEVERE: Servlet.service() for servlet [collection-search] in context with path [/collection-search] threw exception [Request processing failed; nested exception is org.springframework.data.solr.UncategorizedSolrException: Expected mime type application/octet-stream but got text/html. <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 404 Not Found</title>
</head>
<body><h2>HTTP ERROR 404</h2>
<p>Problem accessing /solr/select. Reason:
<pre>    Not Found</pre></p><hr /><i><small>Powered by Jetty://</small></i><br/>                                                
<br/>                                                
<br/>                                                
<br/>                                                
<br/>                                                
<br/>                                                
<br/>                                                
<br/>                                                
<br/>                                                
<br/>                                                
<br/>                                                
<br/>                                                
<br/>                                                
<br/>                                                
<br/>                                                
<br/>                                                
<br/>                                                
<br/>                                                
<br/>                                                
<br/>                                                

</body>
</html>

0 个答案:

没有答案