lucene基础有关问题

lucene基础问题RAMDirectory ramnew RAMDirectory()IndexWriter indexWriter new IndexWriter(ram,new

lucene基础问题
RAMDirectory ram=new RAMDirectory();
IndexWriter indexWriter = new IndexWriter(ram,new StandardAnalyzer(),true); 
错误为:Default constructor cannot handle exception type LockObtainFailedException 
 thrown by implicit super constructor. Must define an explicit constructor
和书本上代码一样,怎么会有错误?

[解决办法]
需要处理 LockObtainFailedException 这个异常