I#39;m trying to index files in a document through SOLR and lucene..(我正在尝试通过 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.
这篇关于我正在尝试通过 SOLR 和 lucene 对文档中的文件进行索引.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:我正在尝试通过 SOLR 和 lucene 对文档中的文件进行索引.


基础教程推荐
- 减少 JVM 暂停时间 >1 秒使用 UseConcMarkSweepGC 2022-01-01
- FirebaseListAdapter 不推送聊天应用程序的单个项目 - Firebase-Ui 3.1 2022-01-01
- “未找到匹配项"使用 matcher 的 group 方法时 2022-01-01
- 在 Libgdx 中处理屏幕的正确方法 2022-01-01
- 降序排序:Java Map 2022-01-01
- 如何使用 Java 创建 X509 证书? 2022-01-01
- Java:带有char数组的println给出乱码 2022-01-01
- 设置 bean 时出现 Nullpointerexception 2022-01-01
- Java Keytool 导入证书后出错,"keytool error: java.io.FileNotFoundException &拒绝访问" 2022-01-01
- 无法使用修饰符“public final"访问 java.util.Ha 2022-01-01