lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Smith,Devon" <smit...@oclc.org>
Subject RE: Custom Tokenizer
Date Mon, 05 Feb 2007 14:18:22 GMT
Based on Erik's suggestion, this is exactly what I did and it worked.
Good to know for the future that the solr/lib thing is working yet.

/dev 

-----Original Message-----
From: yseeley@gmail.com [mailto:yseeley@gmail.com] On Behalf Of Yonik
Seeley
Sent: Saturday, February 03, 2007 11:19 AM
To: solr-user@lucene.apache.org
Subject: Re: Custom Tokenizer

Hmmm, classloader hell...
I assume you are putting your analyzer in solr/lib?

Perhaps try to explode the solr webapp and put your custom analyzer
directly in WEB-INF/lib/

-Yonik

On 2/2/07, Smith,Devon <smithde@oclc.org> wrote:
> Hi,
>
> I'm trying to get a custom tokenizer working, but I'm having some 
> problems. Per the instructions on various pages [1][2], I've been able

> to develop and build the factory and tokenizer. However, when I start 
> solr up, I get a stack trace, that says
"java.lang.NoClassDefFoundError:
> org/apache/solr/analysis/BaseTokenizerFactory" That's really
confusing.
>
> Any thoughts on what I'm missing/doing wrong?
>
> Devon
>
> [1] http://wiki.apache.org/solr/SolrPlugins
> [2] http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
>
> ...
> Feb 2, 2007 1:40:53 PM org.apache.solr.schema.IndexSchema readConfig
> INFO: Schema name=mapstore
> java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
> av
> a:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
> or
> Impl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.mortbay.start.Main.invokeMain(Main.java:151)
>         at org.mortbay.start.Main.start(Main.java:476)
>         at org.mortbay.start.Main.main(Main.java:94)
> Caused by: java.lang.NoClassDefFoundError:
> org/apache/solr/analysis/BaseTokenizerFactory
>         at java.lang.ClassLoader.defineClass1(Native Method)
>         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>         at
>
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>         at
java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>         at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at
> org.mortbay.http.ContextLoader.loadClass(ContextLoader.java:233)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
>         at
> java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:594)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:247)
>         at org.apache.solr.core.Config.findClass(Config.java:192)
>         at org.apache.solr.core.Config.newInstance(Config.java:213)
>         at
> org.apache.solr.schema.IndexSchema.readTokenizerFactory(IndexSchema.ja
> va
> :504)
>         at
> org.apache.solr.schema.IndexSchema.readAnalyzer(IndexSchema.java:478)
>         at
> org.apache.solr.schema.IndexSchema.readConfig(IndexSchema.java:296)
>         at
> org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:69)
>         at org.apache.solr.core.SolrCore.<init>(SolrCore.java:191)
>         at
org.apache.solr.core.SolrCore.getSolrCore(SolrCore.java:172)
>         at
org.apache.solr.servlet.SolrServlet.init(SolrServlet.java:72)
>         at javax.servlet.GenericServlet.init(GenericServlet.java:168)
>         at
> org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java
> :3
> 83)
>         at
> org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:243)
>         at
> org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHan
> dl
> er.java:446)
>         at
> org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(Web
> Ap
> plicationHandler.java:321)
>         at
> org.mortbay.jetty.servlet.WebApplicationContext.doStart(WebApplication
> Co
> ntext.java:509)
>         at org.mortbay.util.Container.start(Container.java:72)
>         at org.mortbay.http.HttpServer.doStart(HttpServer.java:708)
>         at org.mortbay.util.Container.start(Container.java:72)
>         at org.mortbay.jetty.Server.main(Server.java:460)
>         ... 7 more
>
> --
> Devon Smith <smithde@oclc.org>
> Senior Software Engineer, Office of Research OCLC Online Computer 
> Library Center, Inc http://www.oclc.org/research/ 
> http://www.oclc.org/research/staff/smith.htm
>

Mime
View raw message