[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform] Re: RCP, JasperReports and classloader

On Fri, 17 Mar 2006 20:55:09 +0100, dara wrote:

> Hi *,
> 
> I have a problem with the plugin classloader.
> In my application I have a single plugin containing the whole data of  
> reporting - means the jasperreport jars and some other special classes to  
> process the reporting.
> I have desinged an extension point for other plugins so the others can  
> simply use my reporting.
> So the other plugins do only provide the datasource and the layout (a  
> *.jasper file)
> 
> But by executing my report with jaserreport a can not find the entities of  
> the plugin using the extension point.
> I handled this problem by switching the classloader :-(.
> Now my entities are visible but I still can not use relative path insinde  
> my layout (for images or i18n property files).
> 
> Does anybody has any idea?
> 
> Many thanks
> Dara



Hi Dara,

I had the same problem. I added following lines to my code.

Thread cur = Thread.currentThread();
ClassLoader save = cur.getContextClassLoader();
cur.setContextClassLoader(JasperCompileManager.class.getClassLoader());

I found this solution on this group (or on the eclipse.platform.rcp)