Skip to main content



      Home
Home » Archived » BIRT » ReportEngineFactory ClassCastException (BIRT 2.2)
ReportEngineFactory ClassCastException (BIRT 2.2) [message #248021] Mon, 16 July 2007 05:14 Go to next message
Eclipse UserFriend
Hi,

Running a report using BIRT 2.1 works fine, but when I run the same report
with BIRT 2.2 gives the following problem:
The first running works fine, but the second running gives the
ClassCastException.
java.lang.ClassCastException:
org.eclipse.birt.report.engine.api.impl.ReportEngineFactory

My code:

// The parent classloader

ClassLoader parentLoader = ReportPlugin.class.getClassLoader();

// Load the class with our own classloader.

URLClassLoader loader = new URLClassLoader(new URL[] { classesDir.toURL()
}, parentLoader);

Thread.currentThread().setContextClassLoader(loader);
…

Platform.startup(econfig);

IReportEngineFactory factory = (IReportEngineFactory)
Platform .createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_E NGINE_FACTORY);

…

HashMap appContext = new HashMap();

appContext.put(EngineConstants.APPCONTEXT_HTML_RENDER_CONTEX T,
renderContext);

appContext.put(EngineConstants.APPCONTEXT_CLASSLOADER_KEY,
Thread.currentThread().getContextClassLoader());


Any help?

Thanks
Is this correct solution? [message #248331 is a reply to message #248021] Tue, 17 July 2007 03:34 Go to previous messageGo to next message
Eclipse UserFriend
If I delete the line “Platform.shutdown();”, it works fine.

Is it correct to leave the platform running?
Re: Is this correct solution? [message #248429 is a reply to message #248331] Tue, 17 July 2007 11:46 Go to previous message
Eclipse UserFriend
Originally posted by: jasonweathersby.alltel.net

Ideally in an application you only want the platform to shutdown on
application exit. It is expensive to start.

Jason

Said wrote:
> If I delete the line �Platform.shutdown();�, it works fine.
> Is it correct to leave the platform running?
>
>
Previous Topic:Start Pie Chart at 45°
Next Topic:Multiple Dataset Parameter Bindings ?
Goto Forum:
  


Current Time: Thu Jul 10 02:25:22 EDT 2025

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

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

Back to the top