Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
HELP!! Nullpointerexception birt factory
vip2cool
hi
i need serious help!
"factory" of the below code is null!!!
its NOT null and everything works when i test run my project in eclipse,
but when i export my project as a jar and use it as a webservice in my app, it's complaining that "factory" is null. ("config" was not null and its set properly)
i have copy all birtengine jars in to the WEB-INF/app/lib of my app.
why would "config" was able to set properly and is not null, while "factory" is null?
how can i fix this problem? greatly apprciated!
IReportEngine engine=null;
EngineConfig config = null;
try{
config = new EngineConfig( );
config.setEngineHome("C:birt-runtime-2_3_1ReportEngine");
config.setLogConfig(null, Level.FINE);
Platform.startup( config );
IReportEngineFactory factory = (IReportEngineFactory) Platform.createFactoryObject( IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
engine = factory.createReportEngine( config );
engine.changeLogLevel( Level.WARNING );
}catch( Exception ex){
ex.printStackTrace();
}
Find more posts tagged with
Comments
mwilliams
Hi vip2cool,
Can you attach the entire error message you're getting? Also, is the code you posted all the code you use to start the BIRT engine?