java AbstractMethodError [英] java AbstractMethodError

查看:136
本文介绍了java AbstractMethodError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在lucene中处理此错误:

How to handle this error in lucene:

java.lang.AbstractMethodError: org.apache.lucene.store.Directory.listAll()[Ljava/lang/String;
        at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:568)
        at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:69)
        at org.apache.lucene.index.IndexReader.open(IndexReader.java:316)
        at org.apache.lucene.index.IndexReader.open(IndexReader.java:188)

我正在进行lucene函数调用,但不幸的是它本身调用了某个类的抽象方法,从上面的错误可以看出这一点。有什么办法解决这个问题?

I am making a lucene function call but unfortunately it itself calls an abstract method of some class, as is evident from the error above. What is the work around for this?

谢谢,Akhil

推荐答案

好!我找到了答案。这不是版本不匹配的问题。相反,扩展抽象类Directory的hadoop contrib的FileSystemDirectory没有实现抽象函数listAll()。 listAll()函数由lucene indexReader.open()函数调用。
我添加了这个功能,它现在正在运行。

Ok! I found the answer. It was not the problem of version mismatch. Rather the hadoop contrib's FileSystemDirectory which extends abstract class Directory did not implement the abstract function listAll(). listAll() function was being called by lucene indexReader.open() function. I added this function and it is up and running now.

谢谢

这篇关于java AbstractMethodError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆