使用加密密码创建Lucene索引

时间:2013-11-11 04:47:44

标签: lucene

我正在尝试使用加密方法创建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();
}

0 个答案:

没有答案