出现这种情况是因为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.的更多相关文章

  1. 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 ...

  2. solr异常--Expected mime type application/octet-stream but got text/html.

    Exception in thread "main" org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrExce ...

  3. 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 ...

  4. Django 导入css文件,样式不起作用。Resource interpreted as Stylesheet but transferred with MIME type application/x-css

    笔者今天在模板中加载css文件时,发现 css样式能够下载再来却无法起作用,而且,图片.js都能够正常使用. 并且 浏览器提示: Resource interpreted as Stylesheet ...

  5. Resource interpreted as Document but transferred with MIME type application/json laravel异常请求返回警告

    一般情况下,laravel在方法里可以向前端返回数组格式 return [], 框架可以自动将数组转成JSON字符串返回,但浏览器会报MIME类型警告, 如是做APP接口可以忽视该警告: 但在前端aj ...

  6. 解决IE浏览器中出现“Resource interpreted as Document but transferred with MIME type application/json”问题

    在上传图片时,使用ajax提交,返回的数据格式为json.在测试时发现IE浏览器中,上传图片后,没有显示图片,而是弹出一个提示:是否保存UploadImg.json文件:而在其他浏览器中正常. 在Ch ...

  7. 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 ...

  8. Resource interpreted as Document but transferred with MIME type application/json

    转自:https://blog.csdn.net/just_lover/article/details/81207472 我在修改并保存后,界面返回提示“undifine”,实际我是看到有返回提示的. ...

  9. IE8 MIME type application/json not found

    如果: public ContentResult GetPaper(string testId) {     return ControllProctector.Do1(() =>        ...

随机推荐

  1. 洛谷—— P1118 [USACO06FEB]数字三角形Backward Digit Su…

    https://www.luogu.org/problem/show?pid=1118#sub 题目描述 FJ and his cows enjoy playing a mental game. Th ...

  2. Altium Designer中距离的测量

    Ctrl+M 清除测量标签:点击右下角的清除按键

  3. 关于mybatis中,批量增删改查以及參数传递的问题

    1.參数传递的问题 大多数情况下,我们都是利用map作为參数,而且大部分情况下都是仅仅有一个參数. 可是,我们也能够利用@param注解,来传入多个參数,此时,mybatis会自己主动将參数封装成ma ...

  4. [D3] Start Visualizing Data Driven Documents with D3 v4

    It’s time to live up to D3’s true name and potential by integrating some real data into your visuali ...

  5. swift 数据存储

    1.plist 存储 1.利用沙盒根目录拼接“Documents”字符串 //存储 func saveArray() { // 1.获得沙盒根路径,不管是真机还是模拟机,用它是最合适不过了 let h ...

  6. Android onLoadFinished与onLoaderReset

    onLoadFinished 这个方法是在前面已创建的加载器已经完成其加载过程后被调用,这个方法保证会在应用到加载器上的数据被释放之前被调用.在此方法中,你必须删除所有对旧数据的使用(因为它将很快会被 ...

  7. Android多线程研究(8)——Java中的原子性理解

    一.什么是原子性 原子性是世界上最小单位,具有不可分割性.比如a=0;(a非long和double类型)这个操作是不可分割的,那么我们说这个操作是原子操作.再比如:a++;这个操作实际上是a=a+1; ...

  8. stm32的ADC外设地址设置算法

    摘自:https://wenku.baidu.com/view/e3ce2a215901020207409c15.html### /////////////////////////////////// ...

  9. stm32四种输入

    1.          上拉输入(GPIO_Mode_IPU)   上拉输入就是信号进入芯片后加了一个上拉电阻,再经过施密特触发器转换成0.1信号,读取此时的引脚电平为高电平:   2.       ...

  10. Java 学习(20):Java Applet 基础 & Java 文档注释

    -- Java Applet 基础 -- Java 文档注释 Java Applet 基础 Applet 是一种 Java 程序.它一般运行在支持 Java 的 Web 浏览器内.因为它有完整的 Ja ...