Foros del Web » Programación para mayores de 30 ;) » Java »

The jar file jasperreports-1.1.1.jar has no source attachment

Estas en el tema de The jar file jasperreports-1.1.1.jar has no source attachment en el foro de Java en Foros del Web. 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 ...
  #1 (permalink)  
Antiguo 07/02/2006, 14:56
 
Fecha de Ingreso: febrero-2006
Mensajes: 8
Antigüedad: 18 años, 2 meses
Puntos: 0
Sonrisa The jar file jasperreports-1.1.1.jar has no source attachment

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.
  #2 (permalink)  
Antiguo 07/02/2006, 17:12
 
Fecha de Ingreso: octubre-2003
Mensajes: 3.578
Antigüedad: 20 años, 6 meses
Puntos: 51
java.lang.NoClassDefFoundError -> org/apache/commons/logging/LogFactory

http://jasperreports.sourceforge.net/requirements.html
  #3 (permalink)  
Antiguo 08/02/2006, 08:38
 
Fecha de Ingreso: febrero-2006
Mensajes: 8
Antigüedad: 18 años, 2 meses
Puntos: 0
De acuerdo Muchas gracias

Muchas gracias por la ayuda prestada.

El problema era que tenía que colocar los .jar mencionados en la librería del Eclipse como Jars Externos, con eso ya funciona de mil maravillas.

Quisiera molestarlos con una nueva consulta, donde puedo encontrar documentación sobre como generar fórmulas en el JasperReport.
Ejemplo:
Sumatoria de A - Sumatoria de B = Diferencia.
ValorBruto - ValorNeto * ValorIVA

Muchas gracias.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 09:47.