1

我正在尝试使用 Encryption 方法创建 lucene 索引,但它抛出了异常:

Exception in thread "AWT-EventQueue-0" java.lang.AbstractMethodError: 
org.apache.lucene.store.Directory.openInput(Ljava/lang/String;)Lorg/apache/lucene/store/IndexInput;

这段代码有什么问题?

try{  
    byte[] salt = new byte[16];
    String password = "lucenetrans";
    DataEncryptor enc = new DataEncryptor("AES/ECB/PKCS5Padding", password, salt, 128,false);
    DataDecryptor dec = new DataDecryptor(password, salt,false);
    indexwriter=new IndexWriter(new TransformedDirectory(FSDirectory.open(outputdir), enc, dec), new StandardAnalyzer(Version.LUCENE_36),true, IndexWriter.MaxFieldLength.LIMITED);
}
catch(Exception ex{
    ex.printStackTrace();
}
4

0 回答 0