solr开发中遇到的异常

来源:互联网 发布:女生内衣品牌知乎 编辑:程序博客网 时间:2024/05/18 12:37


E:\solr 是下载的 .zip的解压目录

F:\tomcat8_extend\webapps\solr 是app程序放入tomcat后的目录

1、Exception in thread "main" org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://localhost:8100/solr/solrhome:

 Expected mime type application/octet-stream but got text/html. <!DOCTYPE html><html><head><title>Apache Tomcat/8.0.33 - Error report</title><style type="text/css">H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}.line {height: 1px; background-color: #525D76; border: none;}</style> </head><body><h1>HTTP Status 404 - /solr/solrhome/update</h1><div class="line"></div><p><b>type</b> Status report</p><p><b>message</b> <u>/solr/solrhome/update</u></p><p><b>description</b> <u>The requested resource is not available.</u></p><hr class="line"><h3>Apache Tomcat/8.0.33</h3></body></html>


是因为我用的: solrhome (这个在当前的solr目录下是不存在的),已经被删除了。需要修改为存在core库目录


2、

 Error CREATEing SolrCore 'new_core': Unable to create core [new_core] Caused by: Can't find resource 'solrconfig.xml' in classpath or 'F:\tomcat8_extend\webapps\solr\solrhome\new_core'

 solrconfig.xml文件从 F:\tomcat8_extend\webapps\solr\solrhome\configsets\basic_configs\conf 下找到的。

解决办法将 这两个文件拷贝到 F:\tomcat8_extend\webapps\solr\solrhome下



3、

 Error CREATEing SolrCore 'new_core': Unable to create core [new_core] Caused by: Can't find resource 'solr.xml' in classpath or 'F:\tomcat8_extend\webapps\solr\solrhome\new_core'

   solr.xml 文件从 E:\solr\server 下找到的

解决办法将 这两个文件拷贝到 F:\tomcat8_extend\webapps\solr\solrhome下


4、

 在之前的Solr版本中(Solr5之前),在创建core的时候,Solr会自动创建好schema.xml,但是在之后的版本中,新加入了动态更新schema功能,这个     默认的schema.xml确找不到了.

          原来,在Solr5以后,这个schema文件已经不是默认生成好的了,它被取了一个名字managed-schema,并且没有后缀。乍一看,以为是打不开的文件,当     然没有什么能难倒程序员的,用EditPlus++打开,发现了熟悉的文字,这不就是之前的schema.xml文件吗? (文件路径:E:\solr\example\example-DIH\solr\db\conf )



5、

Error CREATEing SolrCore 'new_core': Unable to create core [new_core] Caused by: Can't find resource 'lang/contractions_it.txt' in classpath or 'F:\tomcat8_extend\webapps\solr\solrhome\new_core'

lang 文件夹 在 F:\tomcat8_extend\webapps\solr\solrhome\configsets\basic_configs\conf。我将整个conf 文件夹拷贝到了new_core下面




6、

 Error CREATEing SolrCore 'new_core': Unable to create core [new_core] Caused by: Can't find resource 'lang/contractions_it.txt' in classpath or 'F:\tomcat8_extend\webapps\solr\solrhome\new_core'

lang 文件夹 在 F:\tomcat8_extend\webapps\solr\solrhome\configsets\basic_configs\conf。我将整个conf 文件夹拷贝到了new_core下面

阅读全文
0 0
原创粉丝点击