You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Patricio Galeas <ga...@informatik.uni-siegen.de> on 2005/10/17 15:50:46 UTC

Lucene in Action : example code -> document-parsing framework ...

Hi ALL,
I try to run the an example of the "Lucene in Action" book :

Chapter 7: Parsing Common Document Formats:
lia.handlingtypes.framework.FileIndexer

I have downloaded all the source code from www.manning.com/hatcher2
and create a java project in Lucene 3.1.

I become the following error message when the PDF document is indexed :
---------------------------------------
Indexing 
E:\Galeas\downloads\LuceneInAction\LuceneInAction\src\lia\handlingtypes\data\addressbook-entry.xml
log4j:WARN No appenders could be found for logger 
(org.apache.commons.digester.Digester.sax).
log4j:WARN Please initialize the log4j system properly.
Indexing 
E:\Galeas\downloads\LuceneInAction\LuceneInAction\src\lia\handlingtypes\data\addressbook.xml
Indexing 
E:\Galeas\downloads\LuceneInAction\LuceneInAction\src\lia\handlingtypes\data\HTML.html
Indexing 
E:\Galeas\downloads\LuceneInAction\LuceneInAction\src\lia\handlingtypes\data\MSWord.doc
Indexing 
E:\Galeas\downloads\LuceneInAction\LuceneInAction\src\lia\handlingtypes\data\PDF.pdf
Exception in thread "main" java.lang.NoClassDefFoundError: 
org/apache/log4j/Logger
    at org.pdfbox.pdfparser.BaseParser.<clinit>(BaseParser.java:70)
    at 
lia.handlingtypes.pdf.PDFBoxPDFHandler.parseDocument(PDFBoxPDFHandler.java:118)
    at 
lia.handlingtypes.pdf.PDFBoxPDFHandler.getDocument(PDFBoxPDFHandler.java:32)
    at 
lia.handlingtypes.framework.ExtensionFileHandler.getDocument(ExtensionFileHandler.java:39)
    at lia.handlingtypes.framework.FileIndexer.index(FileIndexer.java:43)
    at lia.handlingtypes.framework.FileIndexer.index(FileIndexer.java:36)
    at lia.handlingtypes.framework.FileIndexer.main(FileIndexer.java:77)
---------------------------------------

Have anybody some idea ??
Thank You
Patricio



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Lucene in Action : example code -> document-parsing framework ...

Posted by ms...@aol.com.
Do you have the log4j.properties file in the classpath?
 
-----Original Message-----
From: Patricio Galeas <ga...@informatik.uni-siegen.de>
To: java-user@lucene.apache.org
Sent: Mon, 17 Oct 2005 15:50:46 +0200
Subject: Lucene in Action : example code -> document-parsing framework ...


Hi ALL, 
I try to run the an example of the "Lucene in Action" book : 
 
Chapter 7: Parsing Common Document Formats: 
lia.handlingtypes.framework.FileIndexer 
 
I have downloaded all the source code from www.manning.com/hatcher2 
and create a java project in Lucene 3.1. 
 
I become the following error message when the PDF document is indexed : 
--------------------------------------- 
Indexing E:\Galeas\downloads\LuceneInAction\LuceneInAction\src\lia\handlingtypes\data\addressbook-entry.xml 
log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester.sax). 
log4j:WARN Please initialize the log4j system properly. 
Indexing E:\Galeas\downloads\LuceneInAction\LuceneInAction\src\lia\handlingtypes\data\addressbook.xml 
Indexing E:\Galeas\downloads\LuceneInAction\LuceneInAction\src\lia\handlingtypes\data\HTML.html 
Indexing E:\Galeas\downloads\LuceneInAction\LuceneInAction\src\lia\handlingtypes\data\MSWord.doc 
Indexing E:\Galeas\downloads\LuceneInAction\LuceneInAction\src\lia\handlingtypes\data\PDF.pdf 
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Logger 
  at org.pdfbox.pdfparser.BaseParser.<clinit>(BaseParser.java:70) 
  at lia.handlingtypes.pdf.PDFBoxPDFHandler.parseDocument(PDFBoxPDFHandler.java:118) 
  at lia.handlingtypes.pdf.PDFBoxPDFHandler.getDocument(PDFBoxPDFHandler.java:32) 
  at lia.handlingtypes.framework.ExtensionFileHandler.getDocument(ExtensionFileHandler.java:39) 
  at lia.handlingtypes.framework.FileIndexer.index(FileIndexer.java:43) 
  at lia.handlingtypes.framework.FileIndexer.index(FileIndexer.java:36) 
  at lia.handlingtypes.framework.FileIndexer.main(FileIndexer.java:77) 
--------------------------------------- 
 
Have anybody some idea ?? 
Thank You 
Patricio 
 
 
--------------------------------------------------------------------- 
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org 
For additional commands, e-mail: java-user-help@lucene.apache.org