Hola a todos,
Estoy trabajando con el JasperReport, y he construído todo el reporte en iReport, conectándome a una base de datos FireBird.
Cuando, desde Eclipse, intento hacer el llamado al JasperReport para ejecutarlo, me aparece la siguiente excepcion.
//Esto es lo que envío al Jasper.
c:\informes\rpt_plandecuentas.jasper
{sql_query=SELECT CC_CODIGO, CC_DESCRIPCION, CC_ASENTABLE FROM CUENTA_CONTABLE ORDER BY CC_CODIGO, CC_NIVEL}
org.firebirdsql.jdbc.FBConnection@1292d26
//Esta es la excepcion.
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at net.sf.jasperreports.engine.fill.JRFillDataset.<cl init>(JRFillDataset.java:72)
at net.sf.jasperreports.engine.fill.JRBaseFiller.<ini t>(JRBaseFiller.java:443)
at net.sf.jasperreports.engine.fill.JRVerticalFiller. <init>(JRVerticalFiller.java:92)
at net.sf.jasperreports.engine.fill.JRVerticalFiller. <init>(JRVerticalFiller.java:74)
at net.sf.jasperreports.engine.fill.JRFiller.createFi ller(JRFiller.java:113)
at net.sf.jasperreports.engine.fill.JRFiller.fillRepo rt(JRFiller.java:57)
at net.sf.jasperreports.engine.JasperFillManager.fill Report(JasperFillManager.java:247)
at net.sf.jasperreports.engine.JasperFillManager.fill Report(JasperFillManager.java:163)
at FormsVarios.frv_PlandeCuentas.btn_confirmarActionP erformed(frv_PlandeCuentas.java:124)
at FormsVarios.frv_PlandeCuentas.access$0(frv_PlandeC uentas.java:112)
at FormsVarios.frv_PlandeCuentas$1.actionPerformed(fr v_PlandeCuentas.java:68)
at javax.swing.AbstractButton.fireActionPerformed(Unk nown Source)
at javax.swing.AbstractButton$Handler.actionPerformed (Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed (Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at ch.randelshofer.quaqua.QuaquaButtonListener.mouseR eleased(QuaquaButtonListener.java:87)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent( Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(U nknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unkno wn Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierar chy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
//Este es el codigo del Java.
try {
con = conectarDB();
String reporte = "c:\\informes\\rpt_plandecuentas.jasper";
Map parametros = new HashMap();
parametros.put("sql_query",
new String("SELECT CC_CODIGO, CC_DESCRIPCION, CC_ASENTABLE FROM CUENTA_CONTABLE" +
" ORDER BY CC_CODIGO, CC_NIVEL"));
JasperPrint rpt = JasperFillManager.fillReport(reporte, parametros , con);
/**
* Para visualizar el reporte
*/
JasperViewer.viewReport(rpt);
closeConexion(con);
} catch (Exception ex) {
ex.printStackTrace();
}
Por favor, si alguien podría darme una manito, le estaría agradecido.