Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Eclipse Oxygen - ReporEngine.openReportDesign( reportFile ); fails(Call to ReporEngine.openReportDesign( reportFile ); throws nullpointerexception)
Eclipse Oxygen - ReporEngine.openReportDesign( reportFile ); fails [message #1784776] Wed, 04 April 2018 05:41 Go to next message
Seth Quarshie is currently offline Seth QuarshieFriend
Messages: 1
Registered: April 2018
Junior Member
code snippet:

public IReportEngine getEngine()
{
if( enginePool.isEmpty() ) {
// .... wait
return null;
}
else {
IReportEngine engine = enginePool.remove( 0 );
return engine;
}
}


// help to create engine pool
private static IReportEngine createReportEngine( boolean startPlatform )
{
// configure engine
EngineConfig config = new EngineConfig();
config.setEngineHome( "F:\\workdir\\units\\unit_0_asa\\build\\WEB-INF\\lib\\birt_47\\birt-runtime-4.7.0-20170622\\ReportEngine" );
config.setLogConfig( "F:/workdir/units/unit_0_asa/birt/logs/test.log", Level.FINEST );
try
{
if( startPlatform )
Platform.startup( config );
}
catch( BirtException e )
{
e.printStackTrace();
return null;
}
IReportEngineFactory factory =
(IReportEngineFactory) Platform.createFactoryObject( IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
IReportEngine reportEngine = factory.createReportEngine( config );
reportEngine.changeLogLevel( Level.FINEST );
return reportEngine;
}


reportEngine = getInstance().getEngine();
// load report
String reportFile = "F:/report/hello_world.rptdesign";
IReportRunnable runnable = reportEngine.openReportDesign( reportFile );

This fails in org.eclipse.birt.report.model.core.DesignElement.initSlots( ) because member variable cachedDefn is null.

Is there a way around this problem? Another method call maybe where cachedDefn is bypassed?


Exception:
java.lang.NullPointerException[main 2018-04-03 21:50:17] BIRT: release engine to the report engine pool ...
at org.eclipse.birt.report.model.core.DesignElement.initSlots(DesignElement.java:3028)
at org.eclipse.birt.report.model.elements.ReportDesignImpl.<init>(ReportDesignImpl.java:83)
at org.eclipse.birt.report.model.elements.ReportDesign.<init>(ReportDesign.java:52)
at org.eclipse.birt.report.model.parser.DesignParserHandler.<init>(DesignParserHandler.java:49)
at org.eclipse.birt.report.model.parser.DesignReader.read(DesignReader.java:86)
at org.eclipse.birt.report.model.core.DesignSessionImpl.openDesign(DesignSessionImpl.java:309)
at org.eclipse.birt.report.model.api.SessionHandleImpl.openDesign(SessionHandleImpl.java:294)
at org.eclipse.birt.report.model.api.SessionHandle.openDesign(SessionHandle.java:1)
at org.eclipse.birt.report.engine.parser.ReportParser.getDesignHandle(ReportParser.java:158)
at org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.getReportDesignHandle(ReportEngineHelper.java:255)
at org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.openReportDesign(ReportEngineHelper.java:274)
at org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.openReportDesign(ReportEngineHelper.java:196)
at org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.openReportDesign(ReportEngineHelper.java:130)
at org.eclipse.birt.report.engine.api.impl.ReportEngine.openReportDesign(ReportEngine.java:313)
at com.faceScribe.oaa.processor.javaReflect.birt.ReportEngineContainer.generateReport(ReportEngineContainer.java:202)
at com.faceScribe.oaa.processor.javaReflect.birt.ReportEngineContainer.main(ReportEngineContainer.java:518)
Re: Eclipse Oxygen - ReporEngine.openReportDesign( reportFile ); fails [message #1796844 is a reply to message #1784776] Fri, 19 October 2018 16:46 Go to previous message
Alex Sandro is currently offline Alex SandroFriend
Messages: 1
Registered: October 2018
Junior Member
Hi, have you found a solution to this problem? I'm having the same issue. Thank you.

[Updated on: Thu, 25 October 2018 16:22]

Report message to a moderator

Previous Topic:Birt report runs for few minutes displaying "loading ..." and then goes blank
Next Topic:BIRT Eclipse ODA Plugin : Set Column Display Name
Goto Forum:
  


Current Time: Thu Nov 15 12:53:54 GMT 2018

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

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

Back to the top