Précédent   Forum des professionnels en informatique > Logiciels > Solutions d'entreprise > Business Intelligence > BIRT
BIRT Forum d'entraide sur BIRT (Business Intelligence and Reporting Tools). Avant de poster --> FAQ BIRT,Tutoriels BIRT
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 29/06/2006, 10h57   #1
Membre régulier
 
Inscription : juin 2006
Messages : 94
Détails du profil
Informations forums :
Inscription : juin 2006
Messages : 94
Points : 85
Points : 85
Par défaut Can't load the report engine

Bonjour à tous,

J'ai finalement décidé de passer à ECLIPSE 3.2rc7 et BIRT 2.1rc5.

Créer/Exécuter un rapport BIRT dans eclipse fonctionne sans problèmes.

Lorsque j'essaye de l'exécuter au travers d'une servlet, j'ai l'erreur suivante:

Can't load the report engine
java.lang.NullPointerException
at org.eclipse.birt.report.engine.api.ReportEngine.openReportDesign(ReportEngine.java:110)


Voici le code :

OutputStream out = httpServletResponse.getOutputStream();

EngineConfig config = new EngineConfig();
config.setEngineHome("C:/Java2/workspace/birt-runtime-2_1_0/ReportEngine");


IReportRunnable design = engine .openReportDesign("C:/Java2/workspace/crc/WebRoot/reports/truc.rptdesign");

IRunAndRenderTask task = engine.createRunAndRenderTask(design);

HTMLRenderContext renderContext = new HTMLRenderContext();

HashMap contextMap = new HashMap();

contextMap.put(EngineConstants.APPCONTEXT_HTML_RENDER_CONTEXT,
renderContext);
task.setAppContext(contextMap);

HTMLRenderOption options = new HTMLRenderOption();
options.setOutputStream(out);

task.setRenderOption(options);
task.run();
engine.destroy();



Toutes idées est la bien venue.
Merci
dzafer est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 29/06/2006, 15h17   #2
BiM
Modératrice
 
Avatar de BiM
 
Femme
Consultante/Formatrice BIRT & Ingénieur Java/J2EE/GWT
Inscription : janvier 2005
Messages : 7 299
Détails du profil
Informations personnelles :
Sexe : Femme
Âge : 26
Localisation : France, Haute Garonne (Midi Pyrénées)

Informations professionnelles :
Activité : Consultante/Formatrice BIRT & Ingénieur Java/J2EE/GWT

Informations forums :
Inscription : janvier 2005
Messages : 7 299
Points : 8 650
Points : 8 650
Perso, je rajouterais un :
Code :
options.setOutputFormat("html");
__________________
__~{@ BiM - Modératrice "Business Intelligence" @}~
Consultante/Formatrice BIRT & Ingénieur Java/J2EE/GWT
___________.~{@ Lapine crétine @}~
BiM est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/06/2006, 10h44   #3
Membre du Club
 
Développeur Java
Inscription : juillet 2004
Messages : 204
Détails du profil
Informations personnelles :
Localisation : France, Haute Garonne (Midi Pyrénées)

Informations professionnelles :
Activité : Développeur Java

Informations forums :
Inscription : juillet 2004
Messages : 204
Points : 69
Points : 69
Normal le Null pointer exception ici :
Code :
IReportRunnable design = engine .openReportDesign("C:/Java2/workspace/crc/WebRoot/reports/truc.rptdesign");
si ton engine n'existe pas.

Ou est déclaré ton "engine" ?
Il te faudrait une ligne comme ça
Code :
1
2
 
ReportEngine engine = new ReportEngine(config);
Après avoir mis la config
tiboudchou est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/06/2006, 10h50   #4
BiM
Modératrice
 
Avatar de BiM
 
Femme
Consultante/Formatrice BIRT & Ingénieur Java/J2EE/GWT
Inscription : janvier 2005
Messages : 7 299
Détails du profil
Informations personnelles :
Sexe : Femme
Âge : 26
Localisation : France, Haute Garonne (Midi Pyrénées)

Informations professionnelles :
Activité : Consultante/Formatrice BIRT & Ingénieur Java/J2EE/GWT

Informations forums :
Inscription : janvier 2005
Messages : 7 299
Points : 8 650
Points : 8 650
Il est sûrement déclaré sinon il n'aurait même pas compilé. Mais c'est vrai qu'il n'est peut être pas initialisé...
__________________
__~{@ BiM - Modératrice "Business Intelligence" @}~
Consultante/Formatrice BIRT & Ingénieur Java/J2EE/GWT
___________.~{@ Lapine crétine @}~
BiM est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 00h06.


 
 
 
 
Partenaires

Hébergement Web