Hi, I'm trying to integrate BIRT Engine into a Netbeans RCP app, i'm using ICEPDF to render the report into swing, the problem is when I execute the line
Platform.startup(config);
I get an AssertionError with no further information, I made a research and find out that in the class Platform the variable platform isn't created, and in line 87 throws the error with the assert clause, I need to know what could avoid to initialize the platform variable, heres a code snipet,
public void startEngine() {
Thread t = new Thread() {
@Override
public void run() {
try {
EngineConfig config = new EngineConfig();
File home = InstalledFileLocator.getDefault().locate("ReportEngine", "ideasoft.siatur.reportsengine", false);
config.setBIRTHome(home.getAbsolutePath());
ModuleSystem system = Main.getModuleSystem();
ModuleManager manager = system.getManager();
Module module = manager.get("ideasoft.siatur.reportsengine");
// Class c = module.getClassLoader().loadClass("org.eclipse.birt.core.framework.Platform");
// System.out.println("Found: " + c);
config.getAppContext().put(EngineConstants.APPCONTEXT_CLASSLOADER_KEY, module.getClassLoader());
Platform.startup(config);
IReportEngineFactory ifactory = (IReportEngineFactory) Platform.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
engine = ifactory.createReportEngine(config);
} catch (Exception ex) {
LogHandler.getInstance().exception(ex);
}
}
};
t.start();
}
The Netbeans related code works fine, I debuged it and everything is correct, and when I run the RCP program I get the following result,
SEVERE [org.openide.util.Exceptions]
java.lang.AssertionError
at org.eclipse.birt.core.framework.Platform.startup(Platform.java:87)
[catch] at ideasoft.siatur.cardpanel.cotizacion.util.EngineHelper$1.run(EngineHelper.java:57)
Thnx in advance for your help
Regards