Geração de Relatório Ireport

0 respostas
bruno.mps

Olá pessoal. Estou precisando de uma ajuda.
Estou gerando um relatório simples utilizando JavaBeans DataSource - Eclipse - Ireport e não está rodando aqui na minha máquina desde que eu instalei o Windows Vista.

Já estou há um bom tempo pesquisando sobre este assunto…
Será que alguém pode dar uma dica?

Estou usando todos os JARS do jasperReports para não ter erro…

Erro que aparece:

Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
	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 controle.ControleRelHardGeral.actionPerformed(ControleRelHardGeral.java:140)
	at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
	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(Unknown Source)
	at java.awt.LightweightDispatcher.dispatchEvent(Unknown 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.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException
	at org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:558)
	at org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:355)
	at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:390)
	at net.sf.jasperreports.engine.fill.JRBaseFiller.<clinit>(JRBaseFiller.java:96)
	... 31 more
Caused by: java.lang.NullPointerException
	at org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:543)
	... 34 more

Segue o trecho da classe com o actionPerformed que gera o relatório

public void actionPerformed(ActionEvent e) {
				
		JPanel painelD = (JPanel) tela.getContentPane().getComponent(3);
		JTextField destino= (JTextField)painelD.getComponent(1);
		DaoFactory df = DaoFactory.getDaoFactory(DaoFactory.sqlserver);
		DaoHardware Dao = df.getDaoHardware();

		Vector comp = Dao.consultaTodos();
		JRBeanCollectionDataSource jr = new JRBeanCollectionDataSource(comp);
		
		if (e.getActionCommand().equals("Gerar")){
			
			if (tiporel == "terminal") {
				
				try {
						
					JasperFillManager.fillReportToFile("Hard_Geral.jasper", new HashMap(), jr);
					JasperViewer.viewReport("Hard_Geral.jrprint", false,true);
					

				} catch (JRException e1) {
					e1.printStackTrace();
				}
				
			}
Criado 5 de agosto de 2008
Respostas 0
Participantes 1