solrj 7.x Expected mime type application/octet-stream but got text/html.
出现这种情况是因为baseurl填写错误,最开始的时候我写的是用tomcat启动后浏览器中访问solr的地址
结果就出现了如题的异常,当然提示的是404,还有可能提示405,Method not allowed,method post is not supported等等
查看源码后发现给出的实例是这种格式http://ip:port/solr/+core,修改后重新测试正常
@Test
public void saveOrUpdate() throws Exception{
//url应为http://ip:port/solr/+core
HttpSolrClient solrClient = new HttpSolrClient.Builder("http://127.0.0.1:8080/solr/solrcore1").build();
SolrInputDocument document = new SolrInputDocument();
document.addField("id","test001");
document.addField("name_ik","my first solr client");
solrClient.add(document);
solrClient.commit();
}
solrj 7.x Expected mime type application/octet-stream but got text/html.的更多相关文章
- solrj6.2异常--Expected mime type application/octet-stream but got text/html.
org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://19 ...
- solr异常--Expected mime type application/octet-stream but got text/html.
Exception in thread "main" org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrExce ...
- odoo 错误 Resource interpreted as Stylesheet but transferred with MIME type application/x-css:
odoo8 页面内容显示一半, web 控制台显示错误 Resource interpreted as Stylesheet but transferred with MIME type ap ...
- Django 导入css文件,样式不起作用。Resource interpreted as Stylesheet but transferred with MIME type application/x-css
笔者今天在模板中加载css文件时,发现 css样式能够下载再来却无法起作用,而且,图片.js都能够正常使用. 并且 浏览器提示: Resource interpreted as Stylesheet ...
- Resource interpreted as Document but transferred with MIME type application/json laravel异常请求返回警告
一般情况下,laravel在方法里可以向前端返回数组格式 return [], 框架可以自动将数组转成JSON字符串返回,但浏览器会报MIME类型警告, 如是做APP接口可以忽视该警告: 但在前端aj ...
- 解决IE浏览器中出现“Resource interpreted as Document but transferred with MIME type application/json”问题
在上传图片时,使用ajax提交,返回的数据格式为json.在测试时发现IE浏览器中,上传图片后,没有显示图片,而是弹出一个提示:是否保存UploadImg.json文件:而在其他浏览器中正常. 在Ch ...
- Invalid mime type "application nd.ms-excel; charset=utf-8;charset=utf-8": does not contain '/'
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is ...
- Resource interpreted as Document but transferred with MIME type application/json
转自:https://blog.csdn.net/just_lover/article/details/81207472 我在修改并保存后,界面返回提示“undifine”,实际我是看到有返回提示的. ...
- IE8 MIME type application/json not found
如果: public ContentResult GetPaper(string testId) { return ControllProctector.Do1(() => ...
随机推荐
- Lintcode 将整数A转换为B
例子 如把31转换为14,须要改变2个bit位. ()10=()2 ()10=()2 贴代码 class Solution { public: /** *@param a, b: Two intege ...
- 宏的使用 extern
声明全局变量使用的技术. 有些时候C语言的一些条条框框就像语法.学会C语言就是学会了语法. 但是语法怎样使用就又是另一回事了. 我希望自己能多学习一些技巧,而不是一些固定的C语言语法. 这篇文章真的很 ...
- python3 格式化输出给定时间的下一秒
# 功能:输入一个时间,格式化输出该时间的下一秒 #!/usr/bin/env python # -*- coding:utf-8 -*- # Author:Hiuhung Wan # 功能:输入一个 ...
- easyui datagrid editor checkbox 单击事件
Easyui datagrid treegrid中能够为行追加checkbox元素.比如: $('#tt').treegrid({ url:'get_data.php', idField:'id', ...
- MVC中url路由规则
Routing:首先获取视图页面传过来的请求,并接受url路径中的controller和action以及参数数据,根据规则将识别出来的数据传递给某controller中的某个action方法 MapR ...
- Java 开发规约插件
阿里巴巴 Java 开发规约插件初体验 阿里巴巴 Java 开发手册 又一次来谈<阿里巴巴 Java 开发手册>,经过这大半年的版本迭代,这本阿里工程师们总结出来避免写出那么多 Bug 的 ...
- 17、网卡驱动程序-DM9000举例
(参考:cs89x0.c可以参考) DM9000 芯片实现网络功能的基础,在接收数据时采用中断方式,即当有数据到来并在 DM9000 内部 CRC 校验通过后会产生一个接收中断: 网卡驱动程序框架: ...
- 【例题3-5 UVA - 1583】Digit Generator
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] for (int i = 1;i <= n;i++) { 算出i是哪一个的生成元. 假设是y. 则ans[y] = min(a ...
- 删除GitHub上项目中的某个文件
原文地址 https://www.jianshu.com/p/242412b43ca5 1.首先在本地中更新有该项目的最新包 即确保本地项目和git上的项目内容保持同步(git pull拉取项目代码) ...
- POI操作Excel常用方法总结 分类: B1_JAVA 2013-08-23 10:01 349人阅读 评论(0) 收藏
转载自:http://blog.csdn.net/xjun15/article/details/5805429 一. POI简介 Apache POI是Apache ...