Platform.createFactoryObject returns null [message #192553] |
Tue, 26 September 2006 07:09 |
Eclipse User |
|
|
|
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 |
|
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 |
Eclipse User |
|
|
|
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 |
|
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.
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03980 seconds