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 31/07/2007, 14h21   #1
Membre Expert
 
Avatar de lazarel
 
Homme
Consultant informatique
Inscription : mai 2007
Messages : 893
Détails du profil
Informations personnelles :
Sexe : Homme
Âge : 30
Localisation : France, Haute Garonne (Midi Pyrénées)

Informations professionnelles :
Activité : Consultant informatique
Secteur : Aéronautique - Marine - Espace - Armement

Informations forums :
Inscription : mai 2007
Messages : 893
Points : 1 360
Points : 1 360
Par défaut [2.2.0]Problème changement de DataSource

Bonjour,


Je génère mes rapports dans un application Web. Je n'est aucun problème lors de la génération et la sauvegarde de rapport en HTML et PDF. Je veux passer à l'étape suivante à savoir changer la connection de ma DataSource.

J'ai suivis les différents sujet dessus, mais je n'arrive pas à passer la seconde étape

Voici mon code :
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
 
try {
	//declare new Session
	session = new SessionHandle(ULocale.ENGLISH);
	logger.info("ULocale :"+session.getULocale().toString());
	//open rptdesign
	if (session!=null){
		logger.info("OPEN FILE :"+getServletContext().getRealPath(reportFile));
		rdHandle = session.openDesign(getServletContext().getRealPath(reportFile));}
	}
catch (BirtException e) {
	logger.error("Error :"+e+"\n");
}
Ca ne sert à rien d'aller plus loin car je me fait jetter ici
Code :
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
31 mai 2007 14:11:19 org.apache.catalina.core.StandardWrapperValve invoke
GRAVE: "Servlet.service()" pour la servlet MyBirtServlet a généré une exception
java.lang.NullPointerException
	at org.eclipse.birt.report.model.core.DesignElement.initSlots(DesignElement.java:2893)
	at org.eclipse.birt.report.model.elements.ReportDesign.<init>(ReportDesign.java:77)
	at org.eclipse.birt.report.model.parser.DesignParserHandler.<init>(DesignParserHandler.java:47)
	at org.eclipse.birt.report.model.parser.DesignReader.read(DesignReader.java:144)
	at org.eclipse.birt.report.model.core.DesignSession.openDesign(DesignSession.java:240)
	at org.eclipse.birt.report.model.core.DesignSession.openDesign(DesignSession.java:217)
	at org.eclipse.birt.report.model.api.SessionHandle.openDesign(SessionHandle.java:222)
	at MyBirtServlet.doGet(MyBirtServlet.java:164)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
	at java.lang.Thread.run(Unknown Source)
Cette erreur survenant juste à l'appel de la méthode openDesign() sachant que lors de l'appel de openReportDesign() j'arrive parfaitement à récupérer un objet de type IReportRunnable avec la String que je passe en paramètre pour la génération de PDF et HTML.

Une idée d'où peut provenir cette erreur

Cordialement Lazarel
lazarel est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 01/08/2007, 09h52   #2
Membre Expert
 
Avatar de lazarel
 
Homme
Consultant informatique
Inscription : mai 2007
Messages : 893
Détails du profil
Informations personnelles :
Sexe : Homme
Âge : 30
Localisation : France, Haute Garonne (Midi Pyrénées)

Informations professionnelles :
Activité : Consultant informatique
Secteur : Aéronautique - Marine - Espace - Armement

Informations forums :
Inscription : mai 2007
Messages : 893
Points : 1 360
Points : 1 360
Re,


Bon voilà j'ai trouvé plus simple et ça marche nikel. Après la création de Task il vous suffit d'appeler la méthode :
Citation:
getReportRunnable().getDesignInstance().getDataSource("Data Source").setPrivateDriverProperty("odaDriverClass","driver")
Pour chacune des propriétés que vous voulez changer.

Voilà
lazarel est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 01/08/2007, 09h53   #3
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
Merci pour ta réponse

Heu juste un truc... Tu utilises la version 2.2(.0) ou 2.1.2 ? (Sinon t'es super fort quand même )
__________________
__~{@ 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 01/08/2007, 13h31   #4
Membre Expert
 
Avatar de lazarel
 
Homme
Consultant informatique
Inscription : mai 2007
Messages : 893
Détails du profil
Informations personnelles :
Sexe : Homme
Âge : 30
Localisation : France, Haute Garonne (Midi Pyrénées)

Informations professionnelles :
Activité : Consultant informatique
Secteur : Aéronautique - Marine - Espace - Armement

Informations forums :
Inscription : mai 2007
Messages : 893
Points : 1 360
Points : 1 360
La version 2.2.0
lazarel 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 08h22.


 
 
 
 
Partenaires

Hébergement Web