Accueil > Forum > > > > Exception au passage java iReport.
Exception au passage java iReport.
mardi 27 mai 2008 à 09:54:32 |
Exception au passage java iReport.
|
mardi 27 mai 2008 à 10:01:24 |
Re : Exception au passage java iReport.
|
mardi 27 mai 2008 à 10:03:45 |
Re : Exception au passage java iReport.

mariam1987
|
Salut tout le monde,
Je m’excuse pour ce que j’ai envoyer au dessus, c’était une erreur voilà ce que j’au voulu envoyer :
J’ai créé un fichier .jasper avec iReport 2.0.5, pour l’appeler j’utilise le code java suivent :
try{
Connection m_con=BD.getconnexion(); //BD.getconnexion est une methode qui renvoie un objet Connection.
// - Paramètres à envoyer au rapport
HashMap parameters= new HashMap();
parameters.put("Matri",19);
// - Execution du rapport
JasperPrint jasperPrint = JasperFillManager.fillReport("ccis11.jasper", parameters, m_con);
// - Création du rapport au format PDF
JasperExportManager.exportReportToPdfFile(jasperPrint, "pieces/piece_n_.pdf");
net.sf.jasperreports.view.JasperViewer.viewReport(jasperPrint,false);
}
catch(Exception e){
System.out.println(e.getMessage());
}
1-Le nom de la classe que j’utilise est InvitePw
2-le nom de l’état est : « ccis11 » et le paramètre que je veux lui passé est sous le nom : « Matri ».
3- L’ordre SQL que de état est : « SELECT * FROM Agent WHERE Matricule =$P {Matri} »
Je travaille sous JCreator et lorsque j’exécute ce code, j’obtiens l’exception :
Exception in thread "AWT-EventQueue-0" 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:57)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:234)
at InvitePw.JasperTest(InvitePw.java:86)
at InvitePw.actionPerformed(InvitePw.java:69)
at javax.swing.JTextField.fireActionPerformed(JTextField.java:492)
at javax.swing.JTextField.postActionEvent(JTextField.java:705)
at javax.swing.JTextField$NotifyAction.actionPerformed(JTextField.java:820)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1636)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2844)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2879)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2807)
at java.awt.Component.processEvent(Component.java:5815)
at java.awt.Container.processEvent(Container.java:2058)
at java.awt.Component.dispatchEventImpl(Component.java:4410)
at java.awt.Container.dispatchEventImpl(Container.java:2116)
at java.awt.Component.dispatchEvent(Component.java:4240)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1848)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:693)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:958)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:830)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:657)
at java.awt.Component.dispatchEventImpl(Component.java:4282)
at java.awt.Container.dispatchEventImpl(Container.java:2116)
at java.awt.Window.dispatchEventImpl(Window.java:2429)
at java.awt.Component.dispatchEvent(Component.java:4240)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Process completed.
La ligne d’ou l’exception provient est :
JasperPrint jasperPrint = JasperFillManager.fillReport("ccis11.jasper", parameters, m_con);
Je ne sais pas ou est le problème, est ce que c’est dans mon code ou c’est dans l’état que j’ai créé.
Merci de m’aider, je m’excuse encore.
|
|
mardi 27 mai 2008 à 16:57:29 |
Re : Exception au passage java iReport.
|
mardi 27 mai 2008 à 17:28:09 |
Re : Exception au passage java iReport.

thevman
|
Salut
As tu essayé d'utiliser le fichier *.jrxml au lieu d'utiliser ton fichier .jasper?
exemple de code: JasperDesign jasperDesign = JRXmlLoader.load("c:\\Invoices.jrxml"); JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign); // - Execution du rapport JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, con);
// - Création du rapport au format PDF JasperExportManager.exportReportToPdfFile(jasperPrint, pathToExport);
|
|
Cette discussion est classée dans : java, passage, exception, ireport
Répondre à ce message
Livres en rapport
|
Derniers Blogs
XNA IS DEAD!XNA IS DEAD! par richardc
Depuis la semaine dernière (et grâce aux TechDays 2012), je me penche activement sur la nouvelle version de Windows, aka Windows 8. Vous me direz, il était temps puisque la première preview date de Septembre dernier.
OK. Remarquez, on n'en est qu'aux...
Cliquez pour lire la suite de l'article par richardc TECHDAYS PARIS 2012 : WINDOWS SERVER "8" QUOI DE 9 !TECHDAYS PARIS 2012 : WINDOWS SERVER "8" QUOI DE 9 ! par ROMELARD Fabrice
Speakers: Fabrice Meillon et Stanislas Quastana Cette session est basée entièrement sur celle donnée lors de la BUILD cet hiver. Il n'y a pas d'ajout d'information en rapport avec cet évènement passé. Windows 8 Server sera intégralem...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice [HTML5] AUTOUR DU W3C : NOUVEAUX STANDARDS ET WEB MOBILE (LILLE)[HTML5] AUTOUR DU W3C : NOUVEAUX STANDARDS ET WEB MOBILE (LILLE) par Gio
Je m'y prends un peu tard je sais, mais bon je suis développeur web et donc hyper fainéant ! Toujours dans le cadre des technologies émergentes, ici HTML5, parce qu'on aime HTML5 chez Wyg , nous seront présent, le vieux ( Aurélien V.) et moi, pour pr...
Cliquez pour lire la suite de l'article par Gio [WP7] DYNAMICALLY CHANGE STARTUP PAGE[WP7] DYNAMICALLY CHANGE STARTUP PAGE par KooKiz
Let's say that you want to allow the user to customize the startup page of your application. You can easily change the startup page by editing the 'NavigationPage' attribute in the manifest file. But the manifest cannot be modified once the applicatio...
Cliquez pour lire la suite de l'article par KooKiz
Forum
RE : URL ET JAVARE : URL ET JAVA par Pylouq
Cliquez pour lire la suite par Pylouq
Logiciels
DocTranslate (V3.1.0.0)DOCTRANSLATE (V3.1.0.0)DocTranslate est un traducteur de document Microsoft Word, PowerPoint et Excel. Il permet d'autom... Cliquez pour télécharger DocTranslate Tribler (2012)TRIBLER (2012)Tribler est un client pair à pair (P2P/Peer-to-Peer) open source avec la capacité de regarder des... Cliquez pour télécharger Tribler OneSwarm (2012)ONESWARM (2012)Le peer-to-peer qui protège votre vie privée, c'est OneSwarm.
Ce logiciel de peer-to-peer crypté... Cliquez pour télécharger OneSwarm PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO (V8.4)PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO (V8.4)PONAMEDIA TV DEVIENS HELLLOOO FLASH
LA TV SUR VOTRE ORDINATEUR.
Toute une plateforme Multi... Cliquez pour télécharger PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO Academy System (17.2.1.0)ACADEMY SYSTEM (17.2.1.0)Logiciel de gestion des établissements.
- élèves/étudiants (inscription, dossier, absence...)
-... Cliquez pour télécharger Academy System
|