lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: how to run solr in windows & Tomcat5
Date Mon, 22 May 2006 03:11:05 GMT

As i said: i don't relaly know a lot about running applications from
within an IDE --  and for that matter, i don't really know a lot about
classloaders in general -- but the error you are getting indicates that
when jBuilder tries to run tomcat, which tries to load Solr it's not
finding those classes.

Have you tried running tomcat with the precompiled solr.war *not* in
jBUilder ... just as a standalone java application?  if that works, then
there is probably something wrong with your classpath configuration in
jBuilder.


: Date: Sun, 21 May 2006 19:44:09 -0700 (PDT)
: From: tlw_ray <uo---1@163.com>
: Reply-To: solr-user@lucene.apache.org
: To: solr-user@lucene.apache.org
: Subject: Re: how to run solr in windows & Tomcat5
:
:
: thank you Chris Hostetter,I'm fresher in j2ee develop;I write a servlet
: test;it show
:
: package org.apache.solr.servlet;
:
: import javax.servlet.*;
: import javax.servlet.http.*;
: import java.io.*;
: import java.util.*;
: import org.apache.solr.tst.TestRequestHandler;
: import org.apache.solr.schema.*;
: import org.apache.solr.analysis.*;
: public class ServletClassFrom extends HttpServlet {
:     private static final String CONTENT_TYPE = "text/html; charset=GB18030";
:
:     //Initialize global variables
:     public void init() throws ServletException {
:     }
:
:     //Process the HTTP Get request
:     public void doGet(HttpServletRequest request, HttpServletResponse
: response) throws
:             ServletException, IOException {
:         response.setContentType(CONTENT_TYPE);
:         PrintWriter out = response.getWriter();
:         out.println("<html>");
:         out.println("<head><title>ServletClassFrom</title></head>");
:         out.println("<body bgcolor=\"#ffffff\">");
:         out.println("<p>The servlet has received a GET. This is the
: reply.</p>");
:
:         myFromName("org.apache.solr.request.StandardRequestHandler",out);
:         myFromName("org.apache.solr.tst.OldRequestHandler",out);
:         myFromName("org.apache.solr.tst.TestRequestHandler",out);
:         myFromName("org.apache.solr.schema.IntField",out);
:
:         out.println("</body>");
:         out.println("</html>");
:         out.close();
:     }
:
:     //Clean up resources
:     public void destroy() {
:     }
:     private void myFromName(String classname,PrintWriter out){
:         try{
:         ClassLoader loader = Thread.currentThread().getContextClassLoader();
:         //Thread.currentThread().setContextClassLoader();
:         //out.println("ClassLoader:"+loader.toString()+"<br>");
:         Class cls = loader.loadClass(classname);
:         // Class cls = Class.forName(classname, true, loader);
:            if(cls!=null){out.println("cls"+cls.toString()+"<br>");}
:             out.println("<hr>");
:        } catch (ClassNotFoundException ex) {
:            out.println("Exception:"+ex.getMessage()+"<br>");
:            //ex.printStackTrace(out);
:            out.println(ex.toString());
:            out.println("<hr>");
:        }
:     }
: }
: ---------------------------------------------------------
: result page:
: The servlet has received a GET. This is the reply.
: clsclass org.apache.solr.request.StandardRequestHandler
: clsclass org.apache.solr.tst.OldRequestHandler
: clsclass org.apache.solr.tst.TestRequestHandler
: clsclass org.apache.solr.schema.IntField
: Exception:org.apache.solr.analysis.StandardFilterFactoryjava.lang.ClassNotFoundException:
: org.apache.solr.analysis.StandardFilterFactory
: --------------------------------------------------------------------------------------------------
: Why some class can be load others can not ?
: when I debug solr/admin/index.jsp the infos:
:
: 信息: Initializing Coyote HTTP/1.1 on http-8080
:
: 2006-5-22 10:40:28 org.apache.catalina.startup.Catalina load
:
: 信息: Initialization processed in 1078 ms
:
: 2006-5-22 10:40:28 org.apache.catalina.core.StandardService start
:
: 信息: Starting service Catalina
:
: 2006-5-22 10:40:28 org.apache.catalina.core.StandardEngine start
:
: 信息: Starting Servlet Engine: Apache Tomcat/5.0.28
:
: 2006-5-22 10:40:28 org.apache.catalina.core.StandardHost start
:
: 信息: XML validation disabled
:
: 2006-5-22 10:40:29 org.apache.catalina.loader.WebappClassLoader
: validateJarFile
:
: 信息:
: validateJarFile(E:\app.java\OpenSource_Apache\jakarta-tomcat-5.0.28\webapps\Solr\WebModule1\WEB-INF\lib\servlet-api-2.4.jar)
: - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
: javax/servlet/Servlet.class
:
: 2006-5-22 10:40:29 org.apache.catalina.core.StandardHost getDeployer
:
: 信息: Create Host deployer for direct deployment ( non-jmx )
:
: 2006-5-22 10:40:30 org.apache.coyote.http11.Http11Protocol start
:
: 信息: Starting Coyote HTTP/1.1 on http-8080
:
: 2006-5-22 10:40:30 org.apache.catalina.startup.Catalina start
:
: 信息: Server startup in 1266 ms
:
: 2006-5-22 10:40:31 org.apache.solr.core.SolrConfig initConfig
:
: 信息: Loaded SolrConfig: solrconfig.xml
:
: 2006-5-22 10:40:32 org.apache.solr.core.RequestHandlers <init>
:
: 信息: adding requestHandler standard=solr.StandardRequestHandler
:
: 2006-5-22 10:40:32 org.apache.solr.request.StandardRequestHandler init
:
: 信息: Unused request handler arguments:{}
:
: 2006-5-22 10:40:32 org.apache.solr.core.SolrCore <init>
:
: 信息: Opening new SolrCore at solr/, dataDir=solr/data
:
: 2006-5-22 10:40:32 org.apache.solr.schema.IndexSchema readConfig
:
: 信息: Reading Solr Schema
:
: 2006-5-22 10:40:32 org.apache.solr.schema.IndexSchema readConfig
:
: 信息: Schema name=example
:
: StandardWrapperValve[debugjsp]: Servlet.service() for servlet debugjsp threw
: exception
:
: org.apache.solr.core.SolrException: Error loading class
: 'solr.StandardFilterFactory'
:
: org.apache.solr.core.SolrException: Error loading class
: 'solr.StandardFilterFactory'
:
: --
: View this message in context: http://www.nabble.com/how+to+run+solr+in+windows+-+Tomcat5-t1658550.html#a4499269
: Sent from the Solr - User forum at Nabble.com.
:



-Hoss


Mime
View raw message