lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Error loading custom jar file on Tomcat
Date Fri, 09 Jul 2010 22:38:47 GMT

: It works properly with Solr Night build snapshot under Windows: I have copied
: compiled jar file HyphenationCompoundWordTokenFilterFactory.class
: 
: into
: C:\hudson\apache-solr-4.0-2010-06-30_08-05-55\example\work\Jetty_0_0_0_0_8983_solr.war__solr__k1kf17\webapp\WEB-INF\lib\apache-solr-core-4.0-2010-06-30_08-05-55.jar\org\apache\solr\analysis\

1) Don't do that.

this is a really bad idea for loading custom classes in Solr.  Compile 
your class, put it into your *own* jar, and then configure SOlr to load 
that jar...

http://wiki.apache.org/solr/SolrPlugins#How_to_Load_Plugins

2) The specific error you are getting...

: java.lang.NoClassDefFoundError:
: org/apache/solr/analysis/HyphenationCompoundWordTokenFilterFactory (wrong
: name: HyphenationCompoundWordTokenFilterFactory) at

indicates that the class file java is finding when it loads 
org/apache/solr/analysis/HyphenationCompoundWordTokenFilterFactory out of 
the classpath doesn't actually have the fully qualified package name that 
matches where you put it.

Googling for "java.lang.NoClassDefFoundError wrong name" turned up lots of 
explanation on this type of error, here is a very nicely written straight 
forward one...

http://www.cs.usfca.edu/~parrt/course/601/lectures/java.tools.html


-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message