Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Is there a way to execute .prpti file from within a java application

  1. #1
    Join Date
    Mar 2014
    Posts
    4

    Default Is there a way to execute .prpti file from within a java application

    Hi,

    I tried running the samples by downloading them which is provided in InfoCenter under the section
    'Embedding the Reporting Engine into a Java applocation'.

    I could execute a report (.prpt file) which is developed in Report Designer from within
    a java application to generate the output file which is what Sample1 does.

    But I couldn't find success in executing an interactive report (.prpti file) from within a java application.

    Here is the exception stack trace I have been getting :

    org.pentaho.reporting.libraries.resourceloader.ResourceCreationException: Unable to parse the document: ResourceKey{schema=org.pentaho.reporting.libraries.resourceloader.loader.URLResourceLoader, identifier=file:/D:/eclipse-workspace-new-2/samples/eclipse-bin/org/pentaho/reporting/engine/classic/samples/ordersales%20analyzer%20report.xanalyzer, factoryParameters={}, parent=null}
    at org.pentaho.reporting.libraries.xmlns.parser.AbstractXmlResourceFactory.create(AbstractXmlResourceFactory.java:250)
    at org.pentaho.reporting.libraries.resourceloader.DefaultResourceManagerBackend.create(DefaultResourceManagerBackend.java:270)
    at org.pentaho.reporting.libraries.resourceloader.ResourceManager.create(ResourceManager.java:442)
    at org.pentaho.reporting.libraries.resourceloader.ResourceManager.create(ResourceManager.java:378)
    at org.pentaho.reporting.libraries.resourceloader.ResourceManager.createDirectly(ResourceManager.java:214)
    at org.pentaho.reporting.engine.classic.samples.Sample12.getReportDefinition(Sample12.java:67)
    at org.pentaho.reporting.engine.classic.samples.AbstractReportGenerator.generateReport(AbstractReportGenerator.java:160)
    at org.pentaho.reporting.engine.classic.samples.AbstractReportGenerator.generateReport(AbstractReportGenerator.java:128)
    at org.pentaho.reporting.engine.classic.samples.Sample12.main(Sample12.java:126)
    Caused by: org.pentaho.reporting.libraries.xmlns.parser.NoRootHandlerException: No suitable root handler known for this document: XmlDocumentInfo={rootElementTag=reportRecord, rootElementNS=http://www.pentaho.com, SystemDTD-ID=null, PublicDTD-ID=null, defaultnamespace=http://www.pentaho.com} [Location: Line=-1 Column=-1]
    at org.pentaho.reporting.libraries.xmlns.parser.MultiplexRootElementHandler.interceptFirstStartElement(MultiplexRootElementHandler.java:217)
    at org.pentaho.reporting.libraries.xmlns.parser.RootXmlReadHandler.startElement(RootXmlReadHandler.java:430)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:400)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:626)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3103)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:922)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
    at org.pentaho.reporting.libraries.xmlns.parser.AbstractXmlResourceFactory.create(AbstractXmlResourceFactory.java:237)



    I checked in the infocenter and in Pentaho forums whether it is possible to execute a .prpti file from within a java application,
    But couldn't find the answer. Only it says that a .prpt file can be executed.
    Is there a way to execute .prpti file from within a java application for generating the output just likes with .prpt file?

    Thanks and regards,
    Raman Kumar.

  2. #2
    Join Date
    Mar 2003
    Posts
    8,085

    Default

    Most likely, your classpath is incomplete. Use the SDK to get a sample module that includes a full classpath ( https://github.com/tmorgner/pentaho-...ample-use-full ).

    At that point, you will be able to simply point the code in this particular sample to your prpti file, and it will run.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  3. #3
    Join Date
    Mar 2014
    Posts
    4

    Default

    Hi Taqua,


    Thanks for a quick response.

    regards,
    Raman Kumar.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.