You seem to be using the example code from LIA chapter 7, however you seem to be confusing the "DocumentHandlerException" class mentioned there with org.ujac.print.DocumentHandlerException -- a completely unrelated class that just happens to have the same name (i'm guessing you found it doing a google search when your code wouldn't compile)
http://ujac.sourceforge.net/UJAC/docs/api/org/ujac/print/DocumentHandlerException.html ...if you read section 7.1.1 it says... all classes imlementing the DocumentHandler interface throw a DocumentHandlerException. This is a checked exception, a simple subclass of Java's Exception class, so we'll omit it's listing. ...but if you go download the source code Otis and Erik have made available, you'll find it included... http://www.lucenebook.com/LuceneInAction.zip : Date: Mon, 26 Sep 2005 10:49:47 -0700 (PDT) : From: tirupathi reddy <[EMAIL PROTECTED]> : Reply-To: java-user@lucene.apache.org : To: java-user@lucene.apache.org : Subject: Problem in .txt file indexing : : hello, : : I am using the following code to index text files. : : InputStream is = new FileInputStream(pdf); : : DefaultStyledDocument styledDoc = new DefaultStyledDocument(); : try { : new RTFEditorKit().read(is, styledDoc, 0); : bodyText = styledDoc.getText(0, styledDoc.getLength()); : } : catch (IOException e) { : throw new DocumentHandlerException( : "Cannot extract text from a RTF document", e); : } : catch (BadLocationException e) { : throw new DocumentHandlerException( : "Cannot extract text from a RTF document", e); : } : if (bodyText != null) { : mDocument.add(Field.Text("fulltext", bodyText)); : } : : But I am getting the error as can't find symbol DocumentHandlerException . : : And I import org.ujac.print.DocumentHandlerException. : : But I don't have that package. From where I can get that package? : Or else How to solve the above problem? : : : : Tirupati Reddy Manyam : 24-06-08, : Sundugaullee-24, : 79110 Freiburg : GERMANY. : : Phone: 00497618811257 : cell : 004917624649007 : : : --------------------------------- : Yahoo! for Good : Click here to donate to the Hurricane Katrina relief effort. -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]