solr开发中遇到的异常


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. Apache Tomcat/8.0.33 - Error report

HTTP Status 404 - /solr/solrhome/update

type Status report

message /solr/solrhome/update

description The requested resource is not available.


Apache Tomcat/8.0.33



是因为我用的: 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下面

你可能感兴趣的:(solr开发中遇到的异常)