Expected mime type application/octet-stream but got text/html.
在執行solr技術的工程的時候出現Expected mime type application/octet-stream but got text/html.錯誤
網上找的原因有:
在使用Tomcat部署Solr後,Collection1的地址為:http://ip:8080/solr/#/collection1,但使用SolrJ進行索引的時候,應該使用http://ip:8080/solr/collection1,即無中間的#號。
即正確程式碼為:
- String serverUrl = (args != null && args.length > 0) ? args[0]
- : "http://ip:8080/solr/collection1";
- String serverUrl = (args != null && args.length > 0) ? args[0]
- : "http://ip:8080/solr/#/collection1";
但是我的是因為solrServer配置出錯,正確的應該是:
<bean id="httpSolrServer" class="org.apache.solr.client.solrj.impl.HttpSolrServer">
<constructor-arg index="0" value="http://localhost:8081/solr"/>
</bean>
同時應該開啟tomcat伺服器中的startup.bat。這樣子solr才能訪問成功
相關文章
- MIME TYPE (轉)
- [Vue warn]: Invalid prop: type check failed for prop "unlinkPanels". Expected Boolean, got String with value "true".VueAIBooleanGo
- Error-Expected resource of typeError
- vue報錯:[Vue warn]: Invalid prop: type check failed for prop "value". Expected Number, got String....VueAIGo
- inconsistent datatypes: expected - got CLOB錯誤一例Go
- 執行時報錯RuntimeError: expected device cpu but got device cuda:0ErrordevGo
- xcode6編譯錯誤,提示Expected a typeXCode編譯
- yolov5 train報錯:TypeError: expected np.ndarray (got numpy.ndarray)YOLOAIErrorGo
- [Java]根據檔案取得Mime Type的各種方法(轉)Java
- No qualifying bean of type 'javax.sql.DataSource' available: expected at least 1BeanJavaSQLAIAST
- Android Studio 打包APK遇到Error: Expected resource of type id [ResourceType]AndroidAPKError
- MIME郵件的multipart型別與text型別的區別型別
- ios Request failed: unacceptable content-type: text/html"iOSAIHTML
- HTML中input type="text"和type="password" 顯示的長度不一樣HTML
- css匹配type屬性值為text的input元素CSS
- 設定input type為text的文字框樣式
- Pycharm:設定完Anaconda後報錯TypeError: an integer is required (got type bytes)PyCharmErrorUIGo
- python用pyinstaller生成exe時報錯 TypeError: an integer is required (got type bytes)PythonErrorUIGo
- 谷歌,火狐提示來自"http://xxx.com/file"的資源已被阻止,因為 MIME 型別("text/plain")不匹配(X-Content-Type-Options: nosniff)谷歌HTTP型別AI
- css設定type為text的input元素的樣式CSS
- SAP CRM WebClient UI Text Type 顯示的過濾邏輯WebclientUI
- MIME筆記筆記
- IIS-MIME
- E. Expected Power
- She Got her ownGo
- .apk的MIME型別APK型別
- 常見MIME型別型別
- switch case 的 expected expressionExpress
- input標籤單行文字域type="text"的可以新增屬性以及其描述
- mysqldump Got error: 1045MySqlGoError
- mysqld got signal 8MySqlGo
- 郵件協議之MIME協議
- 什麼是MIME型別型別
- Python IndentationError: expected an indented blockPythonErrorBloC
- golang expected declaration, found 'IDENT'GolangIDE
- exp tables sh: Syntax error: `(' is not expectedError
- mysqldump Got error 1290MySqlGoError
- 常見檔案MIME對照表