Précédent   Forum des professionnels en informatique > Logiciels > Solutions d'entreprise > Business Intelligence > Jasper
Jasper Forum d'entraide sur Jasper Reports. Avant de poster --> FAQ Jasper, Tutoriels Jasper
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 16/04/2008, 11h03   #1
Invité régulier
 
Inscription : novembre 2004
Messages : 19
Détails du profil
Informations forums :
Inscription : novembre 2004
Messages : 19
Points : 7
Points : 7
Par défaut [Visual Editor et BIRT ou IRePORT]

Bonjour tout le monde

Ca fait deux semaines que j'ai commencé à travailler avec Eclipse. Je fais les interfaces avec Visual editor. Je veux utiliser Birt ou ireport pour faire les rapports. Mon problème c'est que lors de l'intallation de ces outils (ireport ou birt), je dois ajouter des librairie dans le built path de mon projet comme on le dit ici :http://www.eclipse.org/birt/phoenix/...tEngineAPI.php. Quand j'ajoute ces jar, mes interfaces concus avec Visual editor ne s'affichent plus et un message d'erreur dit: << IWAV0138E Remote VM terminated too soon. See .log file to trace the out put >>. J'ai eu le même problème quand je voulais charger les jar de Ireport. Quand j'enlève ces nouveau jar mes intefaces reapparaissent correctement. Quelqu'un peut il m'aider s'il vous plait? Ca fait deux jours que fouille dans les forums.

Eclipse 3.2
JRE 1.6.0_05
VE SDK 1.2.1
Birt report designer framework 2.1.2


Voici le contenu du .log file:
Code :
1
2
3
4
5
6
7
8
9
10
11
 
!ENTRY org.eclipse.jem.proxy 2 0 2008-04-16 09:45:18.906
!MESSAGE IWAV0138E Remote VM terminated too soon. See .log file for trace of output. For VM "Project (Projet2SEP)-VM for Projet2SEP".
IWAV0072I Remote VM terminated before any commands can be sent. Following are the error and output streams.
Remote VM Commandline:
 "C:\Program Files\Java\jre1.6.0_05\bin\javaw.exe" -Dproxyvm.registryKey=30901317 -Dproxyvm.masterPort=1085 -Dproxyvm.bufsize=16000 "-Dproxyvm.servername=Project (Projet2SEP)-VM for Projet2SEP" -noverify -classpath "C:/Mamoudou/Campost/PROJETS/Dev Plate forme/eclipse-SDK-3.2-win32/eclipse/configuration/org.eclipse.osgi/bundles/387/1/.cp/vm/remotevm.jar;C:/Mamoudou/Campost/PROJETS/2SEP/Appli/Projet2SEP/bin/;C:/Mamoudou/Campost/PROJETS/2SEP/Appli/Projet2SEP/lib/cglib-full-2.0.2.jar;C:/Mamoudou/Campost/PROJETS/2SEP/Appli/Projet2SEP/lib/commons-collections-2.1.1.jar;C:/Mamoudou/Campost/PROJETS/2SEP/Appli/Projet2SEP/lib/commons-logging-1.0.4.jar;C:/Mamoudou/Campost/PROJETS/2SEP/Appli/Projet2SEP/lib/dom4j-1.4.jar;C:/Mamoudou/Campost/PROJETS/2SEP/Appli/Projet2SEP/lib/ehcache-0.9.jar;C:/Mamoudou/Campost/PROJETS/2SEP/Appli/Projet2SEP/lib/hibernate2.jar;C:/Mamoudou/Campost/PROJETS/2SEP/Appli/Projet2SEP/lib/jta.jar;C:/Mamoudou/Campost/PROJETS/2SEP/Appli/Projet2SEP/lib/jtds-0.8.1.jar;C:/Mamoudou/Campost/PROJETS/2SEP/Appli/Projet2SEP/lib/odmg-3.0.jar;C:/Mamoudou/Campost/PROJETS/2SEP/Appli/Projet2SEP/lib/lib_birt/chartengineapi.jar;C:/Mamoudou/Campost/PROJETS/2SEP/Appli/Projet2SEP/lib/lib_birt/com.ibm.icu_3.6.1.v20070906.jar;C:/Mamoudou/Campost/PROJETS/2SEP/Appli/Projet2SEP/lib/lib_birt/commons-cli-1.0.jar;C:/Mamoudou/Campost/PROJETS/2SEP/Appli/Projet2SEP/lib/lib_birt/coreapi.jar;C:/Mamoudou/Campost/PROJETS/2SEP/Appli/Projet2SEP/lib/lib_birt/dataadapterapi.jar;C:/Mamoudou/Campost/PROJETS/2SEP/Appli/Projet2SEP/lib/lib_birt/dteapi.jar;C:/Mamoudou/Campost/PROJETS/2SEP/Appli/Projet2SEP/lib/lib_birt/engineapi.jar;C:/Mamoudou/Campost/PROJETS/2SEP/Appli/Projet2SEP/lib/lib_birt/flute.jar;C:/Mamoudou/Campost/PROJETS/2SEP/Appli/Projet2SEP/lib/lib_birt/js.jar;C:/Mamoudou/Campost/PROJETS/2SEP/Appli/Projet2SEP/lib/lib_birt/modelapi.jar;C:/Mamoudou/Campost/PROJETS/2SEP/Appli/Projet2SEP/lib/lib_birt/modelodaapi.jar;C:/Mamoudou/Campost/PROJETS/2SEP/Appli/Projet2SEP/lib/lib_birt/odadesignapi.jar;C:/Mamoudou/Campost/PROJETS/2SEP/Appli/Projet2SEP/lib/lib_birt/org.apache.commons.codec_1.3.0.v200706111738.jar;C:/Mamoudou/Campost/PROJETS/2SEP/Appli/Projet2SEP/lib/lib_birt/org.eclipse.emf.common_2.2.1.v200702131851.jar;C:/Mamoudou/Campost/PROJETS/2SEP/Appli/Projet2SEP/lib/lib_birt/org.eclipse.emf.ecore_2.2.2.v200702131851.jar;C:/Mamoudou/Campost/PROJETS/2SEP/Appli/Projet2SEP/lib/lib_birt/org.eclipse.emf.ecore.xmi_2.2.2.v200702131851.jar;C:/Mamoudou/Campost/PROJETS/2SEP/Appli/Projet2SEP/lib/lib_birt/org.w3c.css.sac_1.3.0.v200706111724.jar;C:/Mamoudou/Campost/PROJETS/2SEP/Appli/Projet2SEP/lib/lib_birt/scriptapi.jar;C:/Mamoudou/Campost/PROJETS/Dev Plate forme/eclipse-SDK-3.2-win32/eclipse/plugins/org.eclipse.jem.proxy_1.2.0.v20060918_M.jar;C:/Mamoudou/Campost/PROJETS/Dev Plate forme/eclipse-SDK-3.2-win32/eclipse/configuration/org.eclipse.osgi/bundles/565/1/.cp/vm/jfcbeaninfo.jar;C:/Mamoudou/Campost/PROJETS/Dev Plate forme/eclipse-SDK-3.2-win32/eclipse/plugins/org.eclipse.jem.beaninfo_1.2.2.v20061027_M.jar;C:/Mamoudou/Campost/PROJETS/Dev Plate forme/eclipse-SDK-3.2-win32/eclipse/configuration/org.eclipse.osgi/bundles/386/1/.cp/vm/beaninfovm.jar;C:/Mamoudou/Campost/PROJETS/Dev Plate forme/eclipse-SDK-3.2-win32/eclipse/configuration/org.eclipse.osgi/bundles/564/1/.cp/vm/javaremotevm.jar;C:/Mamoudou/Campost/PROJETS/Dev Plate forme/eclipse-SDK-3.2-win32/eclipse/configuration/org.eclipse.osgi/bundles/565/1/.cp/vm/jfcvm.jar" org.eclipse.jem.internal.proxy.vm.remote.RemoteVMApplication
-- Error Stream --
 
-- Output Stream --
 
-- End of Stream Output --

Merci d'avance.
ilyassou est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 16/04/2008, 14h06   #2
Invité régulier
 
Inscription : novembre 2004
Messages : 19
Détails du profil
Informations forums :
Inscription : novembre 2004
Messages : 19
Points : 7
Points : 7
Merci d'avoir repondu. Mes rapports sont fait dans birt ou ireport. Le problème c'est que une fois que j'ai installé ces outils dans eclipse, c'est comme si leur installation empechait le bon fonctionnement de visual editor. L'application s'exécute sans erreur, mais pas moyen de concevoir graphiquement les interfaces utilisateurs. Même ceux déjà concus ne s'affichent plus pour que je puisse par exemple les modifer.

Merci d'avance
ilyassou est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 16/04/2008, 17h13   #3
Invité régulier
 
Inscription : novembre 2004
Messages : 19
Détails du profil
Informations forums :
Inscription : novembre 2004
Messages : 19
Points : 7
Points : 7
Salut,

J'ai finalement reussis à chager les jar de iReport sans nuire à visual Editor. Mais j'ai un nouveau problème. J'ai fais un rapport avec iReport. J'ai créé la classe GeneratePDF comme suit:

Code Java :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/**
 * 
 */
package packageprincipal;
 
/**
 * @author Administrateur
 *
 */
 
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;
 
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JasperCompileManager;
import net.sf.jasperreports.engine.JasperExportManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.JasperReport;
import net.sf.jasperreports.engine.design.JasperDesign;
import net.sf.jasperreports.engine.xml.JRXmlLoader;
 
//import com.mysql.jdbc.Driver;
import net.sourceforge.jtds.jdbc.*;
 
public class GeneratePDF {
 
    public static void execute() {
 
        // - Paramètres de connexion à la base de données
       // String url = "jdbc:mysql://localhost/jasper_database";
        String url = "jdbc:jtds:sqlserver://127.0.0.1:1433/2SEP";
        String login = "2SEPuser";
        String password = "2SEPuser";
 
        try {
            // - Connexion à la base
            Driver monDriver = new net.sourceforge.jtds.jdbc.Driver();
            DriverManager.registerDriver(monDriver);
            Connection connection = DriverManager.getConnection(url, login, password);
 
           // - Chargement et compilation du rapport
            JasperDesign jasperDesign = JRXmlLoader.load("C:\\test\\classic.jrxml");
            JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
 
 
 
            // - Paramètres à envoyer au rapport
            Map parameters = new HashMap();
            parameters.put("Titre", "Titre");
 
            // - Execution du rapport
            JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, connection);
 
            // - Création du rapport au format PDF
            JasperExportManager.exportReportToPdfFile(jasperPrint, "C:\\test\\classic.pdf");
        } catch (JRException e) {e.printStackTrace();}
        catch (SQLException e) {e.printStackTrace();}
       // finally {connection.close();}
 
    }
}

J'avoue que je ne comprends pas trop ce que signifie les parametres à envoyer au rapport dans les lignes suivantes:

Code Java :
1
2
3
 // - Paramètres à envoyer au rapport
            Map parameters = new HashMap();
            parameters.put("Titre", "Titre");

Je copié comme dans un tuto.

J'ai donc créé un objet genererpdf de cette classe et j'ai appelé la méthode execute(). Voici les messages d'erreur que je rencontre. Quelqu'un peut il m'aider? Merci d'avance.


net.sf.jasperreports.engine.JRException: Error compiling report java source files :
Citation:
C:\Mamoudou\Campost\PROJETS\2SEP\Appli\Projet2SEP\classic_1208357712687_972332.java
at net.sf.jasperreports.engine.design.JRJavacCompiler.compileClasses(JRJavacCompiler.java:93)
at net.sf.jasperreports.engine.design.JRAbstractClassCompiler.compileUnits(JRAbstractClassCompiler.java:67)
at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:190)
at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:220)
at packageprincipal.GeneratePDF.execute(GeneratePDF.java:47)
at packageprincipal.MainClass$4.actionPerformed(MainClass.java:410)
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.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.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: java.io.IOException: Cannot run program "javac": CreateProcess error=2, Le fichier spécifié est introuvable
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at net.sf.jasperreports.engine.design.JRJavacCompiler.compileClasses(JRJavacCompiler.java:62)
... 32 more
Caused by: java.io.IOException: CreateProcess error=2, Le fichier spécifié est introuvable
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 36 more
ilyassou est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 16/04/2008, 20h33   #4
Invité régulier
 
Inscription : novembre 2004
Messages : 19
Détails du profil
Informations forums :
Inscription : novembre 2004
Messages : 19
Points : 7
Points : 7
Salut à vous tous,

J'ai finalement résolu tous mes problèmes tout seul. Il suffisait d'ajouter le fichier jdt-compiler.jar dans le buildpath de mon projet. Je l'ai fait et je suis maintenant un homme heureux.

Merci à vous qui avez essayé de m'aider
ilyassou est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité Cette discussion est résolue.
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 15h30.


 
 
 
 
Partenaires

Hébergement Web