IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

BIRT Discussion :

Passer un chemin de fichier en paramètre


Sujet :

BIRT

  1. #1
    Membre à l'essai
    Inscrit en
    Février 2007
    Messages
    12
    Détails du profil
    Informations forums :
    Inscription : Février 2007
    Messages : 12
    Points : 10
    Points
    10
    Par défaut Passer un chemin de fichier en paramètre
    Bonjour,

    je souhaite afficher un rapport Birt au format pdf, en passant un chemin de répertoire en paramètre (la variable est documentationPath), mon URL est donc de la forme:

    http:// localhost:8080/birt-viewer/frameset?__report=talend_conception.rptdesign&__format=pdf&documentationPath=d:\Appli\apache-tomcat-6.0.20\webapps\MyProjectIce\upload\output\

    Dans tomcat, j'ai l'erreur:
    GRAVE: Cannot open connection.
    org.eclipse.datatools.connectivity.oda.OdaException ;
    java.net.MalformedURLException: unknown protocol: d

    Par contre, si dans Birt je met la valeur par défaut pour ce paramètre mon rapport s'affiche correctement.

    Quelqu'un aurait une idée sur le format à utiliser dans l'URL ?

  2. #2
    BiM
    BiM est déconnecté
    Expert éminent sénior
    Avatar de BiM
    Femme Profil pro
    Consultante/Formatrice BIRT & Ingénieur Java/J2EE/GWT
    Inscrit en
    Janvier 2005
    Messages
    7 796
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Âge : 38
    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 796
    Points : 10 765
    Points
    10 765
    Par défaut
    Bonjour,

    Il faudrait que tu passes un chemin sous la forme file://d:/etc.

  3. #3
    Membre à l'essai
    Inscrit en
    Février 2007
    Messages
    12
    Détails du profil
    Informations forums :
    Inscription : Février 2007
    Messages : 12
    Points : 10
    Points
    10
    Par défaut
    j'ai essayé:

    http:// localhost:8080/birt-viewer/frameset?__report=talend_conception.rptdesign&__format=pdf&documentationPath=file://d:/Appli/apache-tomcat-6.0.20/webapps/MyProjectIce/upload/output/

    L'erreur est toujours la même

    Je met la trace complète de tomcat:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    66
    67
    68
    69
    70
    GRAVE: Cannot open connection.
    org.eclipse.datatools.connectivity.oda.OdaException ;
        java.net.MalformedURLException: unknown protocol: d
    	at org.eclipse.datatools.enablement.oda.xml.util.XMLSourceFromPath.openInputStream(XMLSourceFromPath.java:70)
    	at org.eclipse.datatools.enablement.oda.xml.impl.Connection.open(Connection.java:85)
    	at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaConnection.open(OdaConnection.java:235)
    	at org.eclipse.birt.data.engine.odaconsumer.ConnectionManager.openConnection(ConnectionManager.java:157)
    	at org.eclipse.birt.data.engine.executor.DataSource.newConnection(DataSource.java:236)
    	at org.eclipse.birt.data.engine.executor.DataSource.open(DataSource.java:223)
    	at org.eclipse.birt.data.engine.impl.DataSourceRuntime.openOdiDataSource(DataSourceRuntime.java:209)
    	at org.eclipse.birt.data.engine.impl.QueryExecutor.openDataSource(QueryExecutor.java:390)
    	at org.eclipse.birt.data.engine.impl.QueryExecutor.prepareExecution(QueryExecutor.java:309)
    	at org.eclipse.birt.data.engine.impl.PreparedQuery.doPrepare(PreparedQuery.java:498)
    	at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.produceQueryResults(PreparedDataSourceQuery.java:189)
    	at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.execute(PreparedDataSourceQuery.java:177)
    	at org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery.execute(PreparedOdaDSQuery.java:143)
    	at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.execute(DataRequestSessionImpl.java:482)
    	at org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExecuteQuery(DteDataEngine.java:115)
    	at org.eclipse.birt.report.engine.data.dte.DataGenerationEngine.doExecuteQuery(DataGenerationEngine.java:79)
    	at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:253)
    	at org.eclipse.birt.report.engine.executor.ExecutionContext.executeQuery(ExecutionContext.java:1755)
    	at org.eclipse.birt.report.engine.executor.QueryItemExecutor.executeQuery(QueryItemExecutor.java:77)
    	at org.eclipse.birt.report.engine.executor.DataItemExecutor.execute(DataItemExecutor.java:75)
    	at org.eclipse.birt.report.engine.executor.ReportExecutorUtil.executeAll(ReportExecutorUtil.java:86)
    	at org.eclipse.birt.report.engine.executor.ReportExecutorUtil.executeAll(ReportExecutorUtil.java:91)
    	at org.eclipse.birt.report.engine.executor.ReportExecutorUtil.executeAll(ReportExecutorUtil.java:91)
    	at org.eclipse.birt.report.engine.executor.ReportExecutorUtil.executeAll(ReportExecutorUtil.java:91)
    	at org.eclipse.birt.report.engine.executor.ReportExecutorUtil.executeAll(ReportExecutorUtil.java:91)
    	at org.eclipse.birt.report.engine.executor.ReportExecutor.createPageExecutor(ReportExecutor.java:223)
    	at org.eclipse.birt.report.engine.internal.executor.emitter.ReportEmitterExecutor.createPageExecutor(ReportEmitterExecutor.java:71)
    	at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplciateReportExecutor.createPageExecutor(SuppressDuplciateReportExecutor.java:59)
    	at org.eclipse.birt.report.engine.executor.ReportExecutorUtil.executeMasterPage(ReportExecutorUtil.java:62)
    	at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.start(HTMLPageLM.java:147)
    	at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:89)
    	at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:101)
    	at org.eclipse.birt.report.engine.presentation.ReportDocumentBuilder.build(ReportDocumentBuilder.java:211)
    	at org.eclipse.birt.report.engine.api.impl.RunTask.doRun(RunTask.java:237)
    	at org.eclipse.birt.report.engine.api.impl.RunTask.run(RunTask.java:90)
    	at org.eclipse.birt.report.service.ReportEngineService.runReport(ReportEngineService.java:1246)
    	at org.eclipse.birt.report.service.BirtViewerReportService.runReport(BirtViewerReportService.java:155)
    	at org.eclipse.birt.report.service.actionhandler.BirtRunReportActionHandler.__execute(BirtRunReportActionHandler.java:81)
    	at org.eclipse.birt.report.service.actionhandler.AbstractBaseActionHandler.execute(AbstractBaseActionHandler.java:90)
    	at org.eclipse.birt.report.presentation.aggregation.layout.FramesetFragment.doService(FramesetFragment.java:189)
    	at org.eclipse.birt.report.presentation.aggregation.layout.FramesetFragment.service(FramesetFragment.java:86)
    	at org.eclipse.birt.report.servlet.ViewerServlet.__doGet(ViewerServlet.java:181)
    	at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.doGet(BirtSoapMessageDispatcherServlet.java:160)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    	at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    	at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.service(BirtSoapMessageDispatcherServlet.java:122)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at org.eclipse.birt.report.filter.ViewerFilter.doFilter(ViewerFilter.java:68)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
    	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
    	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
    	at java.lang.Thread.run(Thread.java:595)
    Caused by: java.net.MalformedURLException: unknown protocol: d
    	at java.net.URL.<init>(URL.java:574)
    	at java.net.URL.<init>(URL.java:464)
    	at java.net.URL.<init>(URL.java:413)
    	at org.eclipse.datatools.enablement.oda.xml.util.XMLSourceFromPath.openInputStream(XMLSourceFromPath.java:65)
    Merci

  4. #4
    BiM
    BiM est déconnecté
    Expert éminent sénior
    Avatar de BiM
    Femme Profil pro
    Consultante/Formatrice BIRT & Ingénieur Java/J2EE/GWT
    Inscrit en
    Janvier 2005
    Messages
    7 796
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Âge : 38
    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 796
    Points : 10 765
    Points
    10 765
    Par défaut
    Réessaye avec 3 slashs : file:///d:/etc.

  5. #5
    Membre à l'essai
    Inscrit en
    Février 2007
    Messages
    12
    Détails du profil
    Informations forums :
    Inscription : Février 2007
    Messages : 12
    Points : 10
    Points
    10
    Par défaut
    En fait j'ai compris que c'est à cause de ma Data Source.

    Dans birt je n'avais pas rendu paramétrable l'url de l'XML source, j'avais:
    d:\Appli\apache-tomcat-6.0.20\webapps\MyProjectIce\upload\output\documentation_talend.xml

    J'ai donc créé une nouvelle variable "XMLLocationParameter".

    J'ai mis Dans le Property Binding de ma data source à "XML Data Source File" la valeur params["XMLLocationParameter"].value

    J'ajoute donc la variable "XMLLocationParameter" dans mon URL, ce qui donne:

    http:// localhost:8080/birt-viewer/frameset?__report=talend_conception.rptdesign&__format=pdf&documentationPath=d:\Appli\apache-tomcat-6.0.20\webapps\MyProjectIce\upload\output&XMLLocationParameter=d:\Appli\apache-tomcat-6.0.20\webapps\MyProjectIce\upload\output\documentation_talend.xml

    Ca fonctionne.
    Merci BiM.

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. XmlReader : comment lui passer le chemin du fichier ?
    Par kopros2 dans le forum Entrée/Sortie
    Réponses: 4
    Dernier message: 19/09/2014, 10h08
  2. Réponses: 8
    Dernier message: 28/10/2010, 11h11
  3. Réponses: 5
    Dernier message: 07/03/2008, 09h17
  4. Réponses: 4
    Dernier message: 30/04/2007, 17h29
  5. Réponses: 1
    Dernier message: 06/04/2006, 13h22

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo