Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » IReportEngineFactory is null! :'(
IReportEngineFactory is null! :'( [message #188633] Wed, 17 January 2007 15:35 Go to next message
Eclipse UserFriend
Originally posted by: ch1ck3n.gmx.de

I read this problem before but I didn't read a solution.

I'm using the BIRT All-in-one-2.1.1.

I just wanted to run a simple example but there is a problem:
The IReportEngineFactory is null! And I can't find my mistake!
My EngineHome Path is correct, also my BuildPath (I hope so..): All
ReportEngine/lib .jars are included.

I just wanted to run the following code but the factory is always null and
that's all I get:
Exception in thread "main"
java.lang.NullPointerException

at report.ExecuteReport.main(ExecuteReport.java:56)

Please help me, I'm really frustrated cause I tried to solve this problems
since two days!

Thank you!


-------------------------------
IReportEngineFactory factory = null;

IReportEngine engine = null;

EngineConfig config = null;

IReportRunnable design = null;


//config

config = new EngineConfig();

config.setEngineHome("C:/birt-runtime-2_1_1/ReportEngine");


// factory

Platform.startup(config);

factory = (IReportEngineFactory)
Platform.createFactoryObject(IReportEngineFactory.EXTENSION_ REPORT_ENGINE_FACTORY);

// engine

engine = factory.createReportEngine(config);

// design

try {

design = engine.openReportDesign("test.rptdesign");

} catch (EngineException e) {

}
Re: IReportEngineFactory is null! :'( [message #188913 is a reply to message #188633] Fri, 19 January 2007 02:18 Go to previous message
Eclipse UserFriend
Originally posted by: wayne.beaton._NOSPAM_eclipse.org

Nina R wrote:
> I read this problem before but I didn't read a solution.
>
> I'm using the BIRT All-in-one-2.1.1.
>
> I just wanted to run a simple example but there is a problem:
> The IReportEngineFactory is null! And I can't find my mistake!
> My EngineHome Path is correct, also my BuildPath (I hope so..): All
> ReportEngine/lib .jars are included.
>
> I just wanted to run the following code but the factory is always null and
> that's all I get:
> Exception in thread "main"
> java.lang.NullPointerException
>
> at report.ExecuteReport.main(ExecuteReport.java:56)
>
> Please help me, I'm really frustrated cause I tried to solve this problems
> since two days!
>
> Thank you!
>
>
> -------------------------------
> IReportEngineFactory factory = null;
>
> IReportEngine engine = null;
>
> EngineConfig config = null;
>
> IReportRunnable design = null;
>
>
> //config
>
> config = new EngineConfig();
>
> config.setEngineHome("C:/birt-runtime-2_1_1/ReportEngine");
>
>
> // factory
>
> Platform.startup(config);
>
> factory = (IReportEngineFactory)
> Platform.createFactoryObject(IReportEngineFactory.EXTENSION_ REPORT_ENGINE_FACTORY);
>
>
> // engine
>
> engine = factory.createReportEngine(config);
>
> // design
>
> try {
>
> design = engine.openReportDesign("test.rptdesign");
>
> } catch (EngineException e) {
>
> }

Try posting this question on eclipse.birt

Wayne
Previous Topic:Separate product for each supported platform
Next Topic:Change marker bar color
Goto Forum:
  


Current Time: Thu Apr 25 16:40:06 GMT 2024

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

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

Back to the top