Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Platform.createFactoryObject returns null
Platform.createFactoryObject returns null [message #192553] Tue, 26 September 2006 07:09 Go to next message
Eclipse UserFriend
Originally posted by: shogun_poczta.onet.pl

Hi.
I just upgraded my birt env from 2.0.1 to 2.1 and cant run report
engine
in test project.
I have an NullPointerException at line:
IReportEngine engine = factory.createReportEngine( config );


part of my code:
EngineConfig config = new EngineConfig();
config.setEngineHome("ReportEngine");
try {
Platform.startup( config );
IReportEngineFactory factory = (IReportEngineFactory)
Platform.createFactoryObject(
IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
IReportEngine engine = factory.createReportEngine( config );
IReportRunnable design =
engine.openReportDesign("SI_congenbill.rptdesign");
IRunAndRenderTask task = engine.createRunAndRenderTask(design);
PDFRenderContext renderContext = new PDFRenderContext();

thx.
Re: Platform.createFactoryObject returns null [message #192660 is a reply to message #192553] Tue, 26 September 2006 16:14 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

It looks like your setEngineHome method is wrong.
Use the full path to the ReportEngine directory.
ie
config.setEngineHome(
"C:/birt-runtime-2_1_0/birt-runtime-2_1_0/ReportEngine" );

Jason

"Shogun" <shogun_poczta@onet.pl> wrote in message
news:mn.d2257d69e643830a.55356@onet.pl...
> Hi.
> I just upgraded my birt env from 2.0.1 to 2.1 and cant run report engine
> in test project.
> I have an NullPointerException at line:
> IReportEngine engine = factory.createReportEngine( config );
>
>
> part of my code:
> EngineConfig config = new EngineConfig();
> config.setEngineHome("ReportEngine");
> try {
> Platform.startup( config );
> IReportEngineFactory factory = (IReportEngineFactory)
> Platform.createFactoryObject(
> IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
> IReportEngine engine = factory.createReportEngine( config );
> IReportRunnable design =
> engine.openReportDesign("SI_congenbill.rptdesign");
> IRunAndRenderTask task = engine.createRunAndRenderTask(design);
> PDFRenderContext renderContext = new PDFRenderContext();
>
> thx.
>
>
Re: Platform.createFactoryObject returns null [message #192759 is a reply to message #192660] Wed, 27 September 2006 07:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: shogun_poczta.onet.pl

Solved after add all jars to classpath from engine\plugins directory.
Actually in my classpath are jars from ChartEngine, ReportEngine,
ReportEngine\lib, ReportEngine\plugins,
ReportEngine\plugins\com.lowagie.itext\lib.

question:
Where is documentation about which jars from birt i should add to my
classpath ?

Thx.
Re: Platform.createFactoryObject returns null [message #192886 is a reply to message #192759] Wed, 27 September 2006 15:21 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

If this is a standalone application all you should have to add is the
reportengine/lib jars.
The plugins directory is auto discovered.

Jason

"Shogun" <shogun_poczta@onet.pl> wrote in message
news:mn.da347d69a5f626a2.55356@onet.pl...
> Solved after add all jars to classpath from engine\plugins directory.
> Actually in my classpath are jars from ChartEngine, ReportEngine,
> ReportEngine\lib, ReportEngine\plugins,
> ReportEngine\plugins\com.lowagie.itext\lib.
>
> question:
> Where is documentation about which jars from birt i should add to my
> classpath ?
>
> Thx.
>
>
Previous Topic:newbie - how can users view BIRT reports without any kind of java server?
Next Topic:Parameter list displays hex ASCII values instead of strings
Goto Forum:
  


Current Time: Wed Apr 24 23:26:12 GMT 2024

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

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

Back to the top