How to generate reports with jasperreports (urgent help)

Dicas e truques sobre Oracle Reports Builder - modo gráfico ou modo caractere, ascii, arquivo .PRT, etc
Post Reply
leandro_bonato
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 22
Joined: Mon, 14 Oct 2013 9:24 pm

Good afternoon srs, I come again ask for the help of you how to generate a report on jasperreports, same basic, because I can not generate the same, I looked for some tutorials but everyone returns the same error: -> "java.lang .Noclassdeffenderor: org / apache / commons / logging / logfactory ". By the little experience of my Java I think missing any import there, I would say it's from Apache Tomcat. I think this is gentlemen, if you can help me, I would appreciate it, anything I can post the code here too (I'm at work at the moment). Thanks!
leandro_bonato
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 22
Joined: Mon, 14 Oct 2013 9:24 pm

Nobody? ? Thanks!
leandro_bonato
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 22
Joined: Mon, 14 Oct 2013 9:24 pm

Srs, below the error that is happening. Thanks!

Select all

Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/apache/commons/digester/Rule 
	at net.sf.jasperreports.components.ComponentsExtensionsRegistryFactory.<clinit>(ComponentsExtensionsRegistryFactory.java:110) 
	at java.lang.Class.forName0(Native Method) 
	at java.lang.Class.forName(Class.java:266) 
	at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForRealName(JRClassLoader.java:157) 
	at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForName(JRClassLoader.java:115) 
	at net.sf.jasperreports.engine.util.ClassUtils.instantiateClass(ClassUtils.java:53) 
	at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.instantiateRegistry(DefaultExtensionsRegistry.java:237) 
	at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.loadRegistries(DefaultExtensionsRegistry.java:214) 
	at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.loadRegistries(DefaultExtensionsRegistry.java:162) 
	at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getRegistries(DefaultExtensionsRegistry.java:133) 
	at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getExtensions(DefaultExtensionsRegistry.java:105) 
	at net.sf.jasperreports.engine.util.JRStyledTextParser.<clinit>(JRStyledTextParser.java:83) 
	at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:121) 
	at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:88) 
	at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:103) 
	at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:61) 
	at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:179) 
	at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:81) 
	at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:446) 
	at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:276) 
	at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:745) 
	at classes.Relatorio.gerar(Relatorio.java:24) 
	at interfaces.RelatorioIncidentes.jButton1ActionPerformed(RelatorioIncidentes.java:482) 
	at interfaces.RelatorioIncidentes.access$1900(RelatorioIncidentes.java:19) 
	at interfaces.RelatorioIncidentes$12.actionPerformed(RelatorioIncidentes.java:254) 
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018) 
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341) 
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) 
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) 
	at javax.swing.plaf.basic.BasicButtonListener$Actions.actionPerformed(BasicButtonListener.java:303) 
	at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1664) 
	at javax.swing.JComponent.processKeyBinding(JComponent.java:2879) 
	at javax.swing.JComponent.processKeyBindings(JComponent.java:2926) 
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2842) 
	at java.awt.Component.processEvent(Component.java:6282) 
	at java.awt.Container.processEvent(Container.java:2229) 
	at java.awt.Component.dispatchEventImpl(Component.java:4861) 
	at java.awt.Container.dispatchEventImpl(Container.java:2287) 
	at java.awt.Component.dispatchEvent(Component.java:4687) 
	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1895) 
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:762) 
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1027) 
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:899) 
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:727) 
	at java.awt.Component.dispatchEventImpl(Component.java:4731) 
	at java.awt.Container.dispatchEventImpl(Container.java:2287) 
	at java.awt.Window.dispatchEventImpl(Window.java:2719) 
	at java.awt.Component.dispatchEvent(Component.java:4687) 
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:729) 
	at java.awt.EventQueue.access$200(EventQueue.java:103) 
	at java.awt.EventQueue$3.run(EventQueue.java:688) 
	at java.awt.EventQueue$3.run(EventQueue.java:686) 
	at java.security.AccessController.doPrivileged(Native Method) 
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) 
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87) 
	at java.awt.EventQueue$4.run(EventQueue.java:702) 
	at java.awt.EventQueue$4.run(EventQueue.java:700) 
	at java.security.AccessController.doPrivileged(Native Method) 
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) 
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:699) 
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242) 
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161) 
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150) 
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146) 
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138) 
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:91) 
Caused by: java.lang.ClassNotFoundException: org.apache.commons.digester.Rule 
	at java.net.URLClassLoader$1.run(URLClassLoader.java:366) 
	at java.net.URLClassLoader$1.run(URLClassLoader.java:355) 
	at java.security.AccessController.doPrivileged(Native Method) 
	at java.net.URLClassLoader.findClass(URLClassLoader.java:354) 
	at java.lang.ClassLoader.loadClass(ClassLoader.java:423) 
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) 
	at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
leandro_bonato
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 22
Joined: Mon, 14 Oct 2013 9:24 pm

UP.
afonso.augusto
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 21
Joined: Thu, 06 Jun 2013 2:06 pm

Could you make available the class that performs the report and the point where it gives the error?
leandro_bonato
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 22
Joined: Mon, 14 Oct 2013 9:24 pm

Many thanks for the reply. Come on then I'll be posting a Form class file that calls the report, the call form, the report class and the report itself, itself, in the Java form that calls the report Look for a report. ; There you only have 1 method for now, I will also be posting the image of all imported libraries in the project. Thanks!
Attachments
Bibliotecas importadas
Bibliotecas importadas
bibliotecas.png (6.86 KiB) Viewed 14520 times
Classes Relatórios.rar
Classes dos relatórios
(8.36 KiB) Downloaded 780 times
afonso.augusto
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 21
Joined: Thu, 06 Jun 2013 2:06 pm

Good morning Leandro ..
I took a look ... I have not seen mistakes in the code ....

The error that you reported:
Exception in thread "awt-eventqueue-0" java.lang.noclassdeffounderRor: org / apache / commons / digester / rule
I gave a search in error that is missing a lib .
In this link speaks to add the lib. http://www.guj.com.br/java/149381-resol ... va-desktop

I thought it could be the version of your Lib Dogester, but her version has the path and the class informed.

Which IDE are you using?
How did you add the lib's?
Try to remove and add the .jars separately.

The issue missing is also in other lib's: http://www.findjar.com/class/org/apache ... /Rule.html

Thanks
leandro_bonato
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 22
Joined: Mon, 14 Oct 2013 9:24 pm

Good morning, Oops I'll do the tests as soon as I get home, but I connected there so I can get some project prints and attach to the topic, the IDE I'm using is NetBeans 7.3, with IREPORT 5.5.0 It was where I created the report, external NetBeans) and JasperReports 5.5.0 (which was is the lib inside the netbeans). Another question is the versions that I am using is correct? And if you are not what versions I will download at that link you passed. Thanks!
Attachments
Bibliotecas
Bibliotecas
leandro_bonato
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 22
Joined: Mon, 14 Oct 2013 9:24 pm

Well thank you very much for the answer, but I finally got it, I had to do in the "marra" the business, I added all the jars, and I was excluding each and it was only missing the jar of the "servlet-api-2.4.jar", follows the printscreen Of how the libraries was, no more to all who read and tried to help me. : D
Attachments
Pacotes para JasperReports
Pacotes para JasperReports
Pacotes para o relatório.png (13.75 KiB) Viewed 14507 times
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 9 guests