我已经按照本教程在 tomcat 上安装(多个)solr 实例
http://wiki.apache.org/solr/SolrTomcat
现在我想设置这个演示,但它不工作
http://www.ibm.com/developerworks/java/library/j-solr1/
我已经构建了演示中提到的 dw.war,现在我收到了这个错误。
java.lang.NoClassDefFoundError: Could not initialize class org.apache.commons.httpclient.HttpClient
org.apache.dwexample.servlet.DWServlet.sendGetCommand(DWServlet.java:714)
org.apache.dwexample.servlet.DWServlet.processSubmitQuery(DWServlet.java:634)
org.apache.dwexample.servlet.DWServlet.doGet(DWServlet.java:120)
org.apache.dwexample.servlet.DWServlet.doPost(DWServlet.java:782)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
以为是/tomcat/lib目录出错,把commons-httpclient-3.0.jar复制到/tomcat/lib目录下,做了
chcon -R -h -t httpd_sys_content_t /usr/share/apache-tomcat-6.0.18/lib/
现在我得到两个错误:
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
org.apache.commons.httpclient.HttpClient.<clinit>(HttpClient.java:65)
org.apache.dwexample.servlet.DWServlet.sendPostCommand(DWServlet.java:663)
org.apache.dwexample.servlet.DWServlet.processSubmitCommand(DWServlet.java:596)
org.apache.dwexample.servlet.DWServlet.processIndexCommand(DWServlet.java:557)
org.apache.dwexample.servlet.DWServlet.processCommit(DWServlet.java:225)
org.apache.dwexample.servlet.DWServlet.doGet(DWServlet.java:100)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
org.apache.commons.httpclient.HttpClient.<clinit>(HttpClient.java:65)
org.apache.dwexample.servlet.DWServlet.sendPostCommand(DWServlet.java:663)
org.apache.dwexample.servlet.DWServlet.processSubmitCommand(DWServlet.java:596)
org.apache.dwexample.servlet.DWServlet.processIndexCommand(DWServlet.java:557)
org.apache.dwexample.servlet.DWServlet.processCommit(DWServlet.java:225)
org.apache.dwexample.servlet.DWServlet.doGet(DWServlet.java:100)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
很想知道如何解决这些错误。cataling 日志输出并没有提供太多依据。
干杯
柯