本文转载于:http://1985wanggang.blog.163.com/blog/static/7763833201011183857606/
java.lang.NoClassDefFoundError: org/apache/lucene/index/memory/MemoryIndex
缺少lucene-memory-3.0.0.jar
在 lucene-3.0.0\contrib\memory\ 下
at org.apache.lucene.search.highlight.WeightedSpanTermExtractor.getReaderForField(WeightedSpanTermExtractor.java:330)
at org.apache.lucene.search.highlight.WeightedSpanTermExtractor.extractWeightedSpanTerms(WeightedSpanTermExtractor.java:252)
at org.apache.lucene.search.highlight.WeightedSpanTermExtractor.extract(WeightedSpanTermExtractor.java:135)
at org.apache.lucene.search.highlight.WeightedSpanTermExtractor.extract(WeightedSpanTermExtractor.java:97)
at org.apache.lucene.search.highlight.WeightedSpanTermExtractor.extract(WeightedSpanTermExtractor.java:97)
at org.apache.lucene.search.highlight.WeightedSpanTermExtractor.getWeightedSpanTerms(WeightedSpanTermExtractor.java:383)
at org.apache.lucene.search.highlight.QueryScorer.initExtractor(QueryScorer.java:216)
at org.apache.lucene.search.highlight.QueryScorer.init(QueryScorer.java:184)
at org.apache.lucene.search.highlight.Highlighter.getBestTextFragments(Highlighter.java:200)
at org.apache.lucene.search.highlight.Highlighter.getBestFragments(Highlighter.java:158)
at org.apache.lucene.search.highlight.Highlighter.getBestFragment(Highlighter.java:104)
at org.apache.lucene.search.highlight.Highlighter.getBestFragment(Highlighter.java:82)
at com.net263.nasp.lucene.test.Test.search(Test.java:165)
at com.net263.nasp.lucene.test.Test.main(Test.java:191)
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.index.memory.MemoryIndex
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 14 more