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 Sun, 21 May 2006 18:23:08 GMT

solr.StandardFilterFactory and any solr.* class names you might see in a
config file are just short alias names for full classnames in the
org.apache.solr.*.* packages.  the method you mention that throws this
exception is responsible for resolving those names in a set of packages
passed in by the caller based on what it's expecting to find.  It's
default behavior is to assume the package name in the config is the full
real class name, if it can't find that then check the known packages, and
if it still can't find it then throw an exception refering to the
*orriginal* name.

the fact that you are seeing this exception means that it can't load any
version of the class, including the fully qualified name
org.apache.solr.analysis.StandardFilterFactory.

YOu said you are running tomcat/solr inside of jBuilder? .. are there
perhaps some jBuilder settings related to classpath context you could try
twiddling? ... i don't personally have a lot of experience running
applications inside of IDEs (particularaly applications like tomcat, which
themselves manage classpaths for other code.


On Sun, 21 May 2006, tlw_ray wrote:

: Date: Sun, 21 May 2006 07:39:48 -0700 (PDT)
: From: tlw_ray <uo---1@163.com>
: Reply-To: solr-user@lucene.apache.org
: To: solr-user@lucene.apache.org
: Subject: how to run solr in windows & Tomcat5
:
:
: I input all the source code in winxp sp2 & tomcat 5 in jBuilder . when I
: debug the application always throw Exception like :
: org.apache.solr.core.SolrException: Error loading class
: 'solr.StandardFilterFactory'...
: Caused by: java.lang.ClassNotFoundException: ...
: such as ort.apache.solr.schema.* all throw this Exception ;I think those
: codes :
: public static Class findClass(String cname, String... subpackages) {
:     ClassLoader loader = Thread.currentThread().getContextClassLoader();
:     if (subpackages.length==0) subpackages = packages;
:
:     // first try cname == full name
:     try {
:       return Class.forName(cname, true, loader);
:     } catch (ClassNotFoundException e) {
:       String newName=cname;
:       if (newName.startsWith(project)) {
:         newName = cname.substring(project.length()+1);
:       }
:       for (String subpackage : subpackages) {
:         try {
:           String name = base + '.' + subpackage + newName;
:           log.finest("Trying class name " + name);
:           return Class.forName(name, true, loader);
:         } catch (ClassNotFoundException e1) {
:           // ignore... assume first exception is best.
:         }
:       }
:
:       throw new SolrException(500, "Error loading class '" + cname + "'", e,
: false);
:     }
: in org.apache.solr.core.Config class cause the exception;
: who can tell me why;Reason is A:cofig file not load?B:tomcat classloader
: cause the exception?C:maybe some liberary not import?D:OTHERS?...
: Thanks!
:
: --
: View this message in context: http://www.nabble.com/how+to+run+solr+in+windows+-+Tomcat5-t1658550.html#a4492962
: Sent from the Solr - User forum at Nabble.com.
:



-Hoss


Mime
View raw message