[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.birt] Re: setting PARENT_CLASSLOADER in birt 2.3
|
- From: Jason Weathersby <jasonweathersby@xxxxxxxxxx>
- Date: Tue, 01 Jul 2008 11:32:10 -0400
- Newsgroups: eclipse.birt
- Organization: EclipseCorner
- User-agent: Thunderbird 2.0.0.14 (Windows/20080421)
Kanu,
Try something like this:
config = new EngineConfig( );
config.setBIRTHome("C:/birt/birt-runtime-2_3_0/birt-runtime-2_3_0/ReportEngine");
;
HashMap mh = (HashMap)config.getAppContext();
mh.put("PARENT_CLASSLOADER", YourClass.class.getClassLoader());
config.setAppContext(mh);
Platform.startup( config );
IReportEngineFactory factory = (IReportEngineFactory) Platform
.createFactoryObject(
IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
engine = factory.createReportEngine( config );
This works in my distribution. I do not get the warning.
Jason
Kanu wrote:
I read some info about changing the method of setting PARENT_CLASSLOADER
in Birt 2.3 and change my code from
task.setAppContext(contextMap);
to
engine.getConfig().setAppContext(contextMap);
But I have the same message:
"01.07.2008 15:22:38 org.eclipse.birt.report.engine.api.impl.EngineTask
isDeprecatedEntry
WARNING: PARENT_CLASSLOADER could not be set in appContext of
IEngineTask, please set it in appContext of IReportEngine"
Because of this my java objects in scripted data source is not
transfered to my report.
What should I do?
It's really important and time-critical for me!