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 对文档中的文件进行索引.
基础教程推荐
- Spring AOP错误无法懒惰地为此建议构建thisJoinPoin 2022-09-13
- 存储 20 位数字的数据类型 2022-01-01
- Struts2 URL 无法访问 2022-01-01
- 修改 void 函数的输入参数,然后读取 2022-01-01
- 如何对 Java Hashmap 中的值求和 2022-01-01
- 使用堆栈算法进行括号/括号匹配 2022-01-01
- REST Web 服务返回 415 - 不支持的媒体类型 2022-01-01
- 无法复制:“比较方法违反了它的一般约定!" 2022-01-01
- 问题http://apache.org/xml/features/xinclude测试日志4j 2 2022-01-01
- RabbitMQ:消息保持“未确认"; 2022-01-01
