-1
我得到一個新的錯誤:獲得一個log4j的:警告在簡單的程序
log4j:WARN No appenders could be found for logger (net.sf.jasperreports.engine.xml.JRXmlDigesterFactory). log4j:WARN Please initialize the log4j system properly.
我使用的NetBeans 7.0.0。我想開發報告。我已經在我的類路徑中設置了Log4j.jar,但仍然看到錯誤。你可以解釋嗎?
代碼片段:
try
{
System.out.println("Compiling report...");
JasperReport report =JasperCompileManager.compileReport("D:\\Schoolmngt\\src\\schoolmngt\\FirstReport.jrxml");
JasperFillManager.fillReportToFile("FirstReport.jasper",new HashMap(), new JREmptyDataSource());
JasperRunManager.runReportToPdfFile("FirstReport.jasper",new HashMap(),new JREmptyDataSource());
System.out.println("Done!");
}
catch(Exception e)
{e.printStackTrace(); }