我在使用 solr 时遇到问题。我在带有 OpenJDK 的 Ubuntu 上运行它:
>> java -version
java version "1.6.0_22"
OpenJDK Runtime Environment (IcedTea6 1.10.2) (6b22-1.10.2-0ubuntu1~11.04.1)
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
管理界面应该由 Jetty 7 提供服务,它根据以下说明安装在 solr/example 文件夹中:http ://wiki.apache.org/solr/SolrJetty#Update_Jetty
在使用“start.jar”启动 solr 时,我看到以下内容:
>> java -jar
2012-05-21 14:03:01.121:WARN:oejd.ContextDeployer:ContextDeployer is deprecated. Use ContextProvider
2012-05-21 14:03:01.126:WARN:oejd.WebAppDeployer:WebAppDeployer is deprecated. Use WebAppProvider
...此时该过程结束。
如果我改为使用“jetty7.jar”,则 solr 会启动并运行,但在尝试访问 localhost:8983/solr/ 的管理界面时,我会看到以下内容:
HTTP ERROR 404
Problem accessing /solr/. Reason:
Servlet Not Initialized
Caused by:
javax.servlet.UnavailableException: Servlet Not Initialized
命令行上的输出如下:
>> java -jar jetty7.jar
2012-05-21 14:03:01.121:WARN:oejd.ContextDeployer:ContextDeployer is deprecated. Use ContextProvider
2012-05-21 14:03:01.126:WARN:oejd.WebAppDeployer:WebAppDeployer is deprecated. Use WebAppProvider
2012-05-21 14:03:01.129:INFO:oejs.Server:jetty-7.6.3.v20120416
2012-05-21 14:03:01.238:INFO:oejw.WebInfConfiguration:Extract jar:file:/var/lib/solr/apache-solr-3.6.0/example/webapps/solr.war!/ to /tmp/jetty-0.0.0.0-8983-solr.war-_solr-any-/webapp
2012-05-21 14:03:02.518:INFO:oejw.StandardDescriptorProcessor:NO JSP Support for /solr, did not find org.apache.jasper.servlet.JspServlet
2012-05-21 14:03:02.565:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/solr,file:/tmp/jetty-0.0.0.0-8983-solr.war-_solr-any-/webapp/},file:/var/lib/solr/apache-solr-3.6.0/example/webapps/solr.war
May 21, 2012 2:03:02 PM org.apache.solr.core.SolrResourceLoader locateSolrHome
INFO: JNDI not configured for solr (NoInitialContextEx)
我认为“NO JSP Support for /solr, did not find org.apache.jasper.servlet.JspServlet”是罪魁祸首。
任何想法为什么会发生这种情况?