Erro com IReport

Estou utilizando um exemplo que encontrei aki em um tutorial do guj. Alguem poderia me dizer pq não funciona?

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.HashMap;
import java.util.Map;
import net.sf.jasperreports.engine.*;
import net.sf.jasperreports.view.JasperViewer;

public class RelatorioBibliotecaPessoal {
	private static Connection getConnection()throws SQLException, ClassNotFoundException {
		String driver = "com.mysql.jdbc.Driver";
		String url = "jdbc:mysql://127.0.0.1:3306/acervo";
		String user = "root";
		String password = "dtic1234";

		Class.forName(driver);
		Connection con = DriverManager.getConnection(url, user, password);
		return con;
	}
	
	public void gerarRelatorio() throws SQLException, ClassNotFoundException, JRException{
		Connection con = getConnection( );
		Statement stm = con.createStatement( );
		String query = "select * from Livro";
		ResultSet rs = stm.executeQuery( query );
		JRResultSetDataSource jrRS = new JRResultSetDataSource( rs );
		Map parameters = new HashMap();
		JasperFillManager.fillReportToFile( "RelatorioBibliotecaPessoal.jasper", parameters, jrRS );
		JasperExportManager.exportReportToPdfFile( "RelatorioBibliotecaPessoal.jrprint" );
		JasperViewer.viewReport( "RelatorioBibliotecaPessoal.pdf", false );
	}
	public static void main(String[] args) throws SQLException, ClassNotFoundException, JRException{
			new RelatorioBibliotecaPessoal().gerarRelatorio();
	}

}[/code]

Já adicionei os jar e tudo mais.
O erro gerado é este:
[code]Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
	at net.sf.jasperreports.engine.fill.JRBaseFiller.<clinit>(JRBaseFiller.java:96)
	at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:147)
	at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:83)
	at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601)
	at net.sf.jasperreports.engine.JasperFillManager.fillReportToFile(JasperFillManager.java:492)
	at net.sf.jasperreports.engine.JasperFillManager.fillReportToFile(JasperFillManager.java:448)
	at RelatorioBibliotecaPessoal.gerarRelatorio(RelatorioBibliotecaPessoal.java:41)
	at RelatorioBibliotecaPessoal.main(RelatorioBibliotecaPessoal.java:53)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClassInternal(Unknown Source)
	... 8 more
at RelatorioBibliotecaPessoal.gerarRelatorio(RelatorioBibliotecaPessoal.java:41) 

Qual a linha 41?

Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory  

[quote]Thrown when an application tries to load in a class through its string name using:

* The forName method in class Class.
* The findSystemClass method in class ClassLoader .
* The loadClass method in class ClassLoader. 

but no definition for the class with the specified name could be found. [/quote]

Provavelmente faltou algum jar ou o driver do mySQL…

ta faltando o .jar do commons logging

Você deve importar para o seu classpath todos os jars que o jasper utiliza…

entre eles estão:

commons-loggin
commons java flow
jasperreport
jasperreport javaflow
jasperreport commons logging

e tem mais 5 qdo eu chegar em casa passo o resto pra ti…

abraços