Bug 22609 - HSSFWORKBOOK looking for Log4J?
Summary: HSSFWORKBOOK looking for Log4J?
Status: RESOLVED INVALID
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 2.0-pre3
Hardware: Other other
: P3 major (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-21 02:45 UTC by Norman
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Norman 2003-08-21 02:45:39 UTC
java.lang.NoClassDefFoundError: org/apache/log4j/Logger
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<clinit>
(HSSFWorkbook.java:115)
	at com.qinteraction.Excel.AnotherExcel.main(AnotherExcel.java:24)
Exception in thread "main" 

This error comes out when I run a simple program using HSSFWORKBOOK.

import java.io.*;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;

public class FirstExcelTest {

	public static void main(String[] args) {
		HSSFWorkbook wb = new HSSFWorkbook();
		FileOutputStream fileOut=null;
		try {
			fileOut = new FileOutputStream("c:\\workbook.xls");	
		
			wb.write(fileOut);			 
			fileOut.close();		
		} catch (FileNotFoundException e) {		
			e.printStackTrace();
		} catch (IOException e1) {		
			e1.printStackTrace();
		}        
	}
}

What's wrong with this code??
java.lang.NoClassDefFoundError: org/apache/log4j/Logger
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<clinit>
(HSSFWorkbook.java:115)
	at com.qinteraction.Excel.AnotherExcel.main(AnotherExcel.java:24)
Exception in thread "main"
Comment 1 Avik Sengupta 2003-10-28 18:17:08 UTC
Just get log4j from http://jakarta.apache.org/log4j and put it in your
classpath. If you have got a source download, running the build will
automatically download it for you. Sorry it took so long to respond, i thought
it was a bigger issue than it is.