Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » rap using the birt3.7.1, IReportEngineFactory is null
rap using the birt3.7.1, IReportEngineFactory is null [message #876631] Fri, 25 May 2012 01:46 Go to next message
ocean xue is currently offline ocean xueFriend
Messages: 107
Registered: November 2011
Senior Member
The IReportEngineFactory is null.
-----------------------------------------------------
config = new EngineConfig();
// config.setEngineHome("D:/document/eclipse/birt/tools/birt-runtime-
3_7_1/ReportEngine");
config.setLogConfig("d:\\logs", java.util.logging.Level.ALL);
IReportEngineFactory factory = (IReportEngineFactory) Platform
.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
engine = factory.createReportEngine(config);
------------------------------------------------------

All ReportEngine / lib JAR has been added to the runtime the classpath,Refer to the attached
Re: rap using the birt3.7.1, IReportEngineFactory is null [message #876892 is a reply to message #876631] Fri, 25 May 2012 13:19 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Do not use the POJO runtime, just use the plugins from the allinone
download. Make sure you have the plugins as listed in the following
config file:

http://www.birt-exchange.org/org/devshare/deploying-birt-reports/1194-eclipse-product-configuration-file-for-webviewer-in-rcp/

You should not have to add anything to the classpath just add the
appropriate plugin dependencies. In the link above it contains another
link to some api example, two of which are RCP apps. One uses the
report engine and the other uses the birt viewer. While the link is an
older version of BIRT, I tested it with 3.7.1 and it worked for me.

Jason


On 5/24/2012 9:46 PM, ocean wrote:
> The IReportEngineFactory is null.
> -----------------------------------------------------
> config = new EngineConfig();
> // config.setEngineHome("D:/document/eclipse/birt/tools/birt-runtime-
> 3_7_1/ReportEngine");
> config.setLogConfig("d:\\logs", java.util.logging.Level.ALL);
> IReportEngineFactory factory = (IReportEngineFactory) Platform
> createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
> engine = factory.createReportEngine(config);
> ------------------------------------------------------
>
> All ReportEngine / lib JAR has been added to the runtime the classpath,Refer to the attached
Re: rap using the birt3.7.1, IReportEngineFactory is null [message #877973 is a reply to message #876892] Mon, 28 May 2012 08:04 Go to previous message
ocean xue is currently offline ocean xueFriend
Messages: 107
Registered: November 2011
Senior Member
Thank you very much
--------------------------------------------------------------------------
IReportEngineFactory factory = (IReportEngineFactory) Platform
.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
IReportEngine engine = factory.createReportEngine(config);
IReportRunnable design = null;
try {
String report = "http://localhost:8080/birtserver/frameset?__report=test_report.rptdesign";
URL url = new URL(report);
InputStream fs = url.openStream();
design = engine.openReportDesign(fs);
......

------------------------------------------------------------------------------
engine.openReportDesign(fs),found error:

Caused by: Error.DesignFileException.INVALID_XML - 2 errors found!
1.) ( line = 81, tag = null) org.eclipse.birt.report.model.util.XMLParserException (code = Error.XMLParserException.SAX_ERROR, message : Line Number:81 Error Code:Error.XMLParserException.SAX_ERROR Exception:org.xml.sax.SAXParseException: The declaration for the entity "ContentType" must end with '>'. Message:SAX detected an error with the basic XML syntax of the file. )
2.) ( line = 81) org.xml.sax.SAXParseException (message : The declaration for the entity "ContentType" must end with '>'.)

Caused by: org.xml.sax.SAXParseException: The declaration for the entity "ContentType" must end with '>'.
Previous Topic:How can I pass a parameter to my report?
Next Topic:Split the results in to Financial Quarters
Goto Forum:
  


Current Time: Thu Apr 25 09:14:23 GMT 2024

Powered by FUDForum. Page generated in 0.02760 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top