Go Back   Forum - BIRT Exchange > Designing BIRT Reports Forums > Designing BIRT Reports

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-26-2009, 03:00 AM
Junior Member
 
Join Date: Jun 2009
Posts: 1
Unhappy ReportEngine error Help please

Hi guys

Im very new to Birt and have managed to grasp the building and previewing of reports, i now have tryed to call my report from a new application and seem to be getting a null pointer exception...

java.lang.NullPointerException
at org.eclipse.birt.report.engine.api.impl.ReportEngine$EngineExtensionManager.<init>(ReportEngine.java:794)
at org.eclipse.birt.report.engine.api.impl.ReportEngine.<init>(ReportEngine.java:105)
at org.eclipse.birt.report.engine.api.impl.ReportEngineFactory$1.run(ReportEngineFactory.java:18)
at org.eclipse.birt.report.engine.api.impl.ReportEngineFactory$1.run(ReportEngineFactory.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.birt.report.engine.api.impl.ReportEngineFactory.createReportEngine(ReportEngineFactory.java:14)
at a.executeReport.executeReporta(executeReport.java:38)
at a.aa.main(aa.java:8)

The code i have is as follows:

public static void executeReporta() throws EngineException
{

IReportEngine engine=null;
EngineConfig config = null;

try{
config = new EngineConfig( );
config.setBIRTHome("C:\\development\\birt-runtime-2_3_2\\ReportEngine");
config.setLogConfig(null, Level.FINEST);
Platform.startup( config );
IReportEngineFactory factory = (IReportEngineFactory) Platform
.createFactoryObject( IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
engine = factory.createReportEngine( config );

IReportRunnable design = null;
//Open the report design
design = engine.openReportDesign("myreport.rptdesign");
IRunAndRenderTask task = engine.createRunAndRenderTask(design);

HTMLRenderOption options = new HTMLRenderOption();
options.setOutputFileName("Parmdisp.html");
options.setOutputFormat("html");


task.setRenderOption(options);
task.run();
task.close();
engine.destroy();
}catch( Exception ex){
ex.printStackTrace();
}
finally
{
Platform.shutdown( );
}

Im not sure if its a class / jar error but i have download and set my build path correctly??

Any help would be very much appricated..

Thanks for you time
Nick
Reply With Quote
  #2 (permalink)  
Old 08-17-2009, 12:01 PM
Junior Member
 
Join Date: Aug 2009
Posts: 6
Default Null pointer exception : ReportEngine.java 794

Hello,
I am facing the same above error. Does any one have a solution to this ? .Any hep would be appreciated .
Thanks
Suj
Reply With Quote
Reply


Thread Tools
Display Modes




All times are GMT -7. The time now is 05:01 AM.
Powered by vBulletin Copyright © 2000-2010 Jelsoft Enterprises Limited.


Content Relevant URLs by vBSEO 3.1.0