我正在尝试通过 SOLR 和 lucene 对文档中的文件进行索引.
正如我在标题中所说:我正在使用 Java,但是当我在 Eclipse 上运行代码时,出现以下错误..
as i said in the title: i am using Java, but when I run the code on Eclipse, i get the following error..
线程main"中的异常 java.lang.NoClassDefFoundError: org/apache/lucene/analysis/util/ResourceLoader在 Indexer.getIndexWriter(Indexer.java:38)在 Indexer.rebuildIndexes(Indexer.java:73)在 SolrIndexer.main(SolrIndexer.java:23)引起:java.lang.ClassNotFoundException:org.apache.lucene.analysis.util.ResourceLoader在 java.net.URLClassLoader$1.run(URLClassLoader.java:202)在 java.security.AccessController.doPrivileged(本机方法)在 java.net.URLClassLoader.findClass(URLClassLoader.java:190)在 java.lang.ClassLoader.loadClass(ClassLoader.java:306)在 sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)在 java.lang.ClassLoader.loadClass(ClassLoader.java:247)... 3 更多
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/lucene/analysis/util/ResourceLoader at Indexer.getIndexWriter(Indexer.java:38) at Indexer.rebuildIndexes(Indexer.java:73) at SolrIndexer.main(SolrIndexer.java:23) Caused by: java.lang.ClassNotFoundException: org.apache.lucene.analysis.util.ResourceLoader 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:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) ... 3 more
SAD 部分:org.apache.lucene.analysis.util.ResourceLoader 类在 Lucene 4.0/3.6/4.0-ALPHA
中不可用.不过,在一些网页上,人们正在谈论 resourceloader 类.
The SAD PART: the class org.apache.lucene.analysis.util.ResourceLoader is not available in Lucene 4.0/3.6/4.0-ALPHA
. although, there are a few webpages where people are talking about the resourceloader class.
有人可以帮我吗?任何帮助将不胜感激..
can anyone help me out here? Any help would be appreciated..
推荐答案
LUCENE-2510
确保你的类路径中有它.
The common analysers have been move lucene-analyzers-common-X.X.X.jar
as a result of LUCENE-2510
Ensure that you have it in your classpath.
相关文章