我们有一个 Solr 索引应用程序。它在 Lubuntu 10.10(这是我的本地 Linux 机器)上运行得很好。但我无法在主机 Debian 2.6.26-15lenny3(gcc 版本 4.1.3 20080704(预发布版)(Debian 4.1.2-25))中运行它。我认为配置没问题,因为 tomcat 管理员可以看到 solr(运行状态为“false”),而且它在 Lubuntu 上也能运行。在 catalina 日志文件中有一个错误:
Jan 31, 2011 7:09:54 PM org.apache.catalina.core.StandardContext resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Invalid or unreadable WAR file : /home/myname/solr/example/webapps/solr.war
at org.apache.naming.resources.WARDirContext.setDocBase(WARDirContext.java:130)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4249)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4418)
at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1276)
at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:624)
at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:136)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:636)
Jan 31, 2011 7:09:54 PM org.apache.catalina.core.StandardContext start
SEVERE: Error in resourceStart()
Jan 31, 2011 7:09:54 PM org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
Jan 31, 2011 7:09:54 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/solr] startup failed due to previous errors
Jan 31, 2011 7:09:54 PM org.apache.catalina.core.StandardContext stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/solr] has not been started
同时,(默认)Jetty Solr(刚刚安装)开始工作。另外,也许有必要说一下,我在 Debian 上安装 Java 和 Tomcat 时遇到了一些困难。我不得不使用测试存储库来安装 tomcat6。
当我尝试从 shell 手动启动 solr 和 jetty 时
java.lang.ClassNotFoundException: org.mortbay.xml.XmlConfiguration
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
at org.mortbay.start.Main.invokeMain(Main.java:166)
at org.mortbay.start.Main.start(Main.java:497)
at org.mortbay.start.Main.main(Main.java:115)
感谢您的帮助。