| Customer Chart Wizard - Script execution causes ClassNotFound exception [message #365935] |
Thu, 13 November 2008 13:12 |
Karl Martens Messages: 2 Registered: July 2009 |
Junior Member |
|
|
Hey,
The custom chart wizard fails to preview data because it cannot find
some of the classes provided within our plug-in. During normal chart
generation we create a report engine with our plug-ins class loader using
the code:
EngineConfig engineConfig = new EngineConfig();
engineConfig.setEngineHome(_reportEngineHome);
final HashMap appContext = _engineConfig.getAppContext();
appContext.put(EngineConstants.APPCONTEXT_CLASSLOADER_KEY,
this.getClass().getClassLoader());
The above code allows the report to be generated as desired. The
problem we're having is with the Custom chart wizard, I haven't been able
to determine a similar method for indicating which class loader should be
used. We're currently using the below code to open the custom chart
dialog:
ChartReportItemBuilderImpl uiServiceProvider = new
ChartReportItemBuilderImpl(taskId);
int result = uiServiceProvider.open(eih);
There is code to determine the correct ExtendedItemHandle and TaskId;
not important for the example but assume the eih represents a valid
ExtendedItemHandle and while getting the the eih we were able to use a
ReportEngine configured in the same manner as used during normal report
generation.
Does anyone know some way we can tell the custom chart wizard to use our
class loader?
regards,
Karl Martens
PS) Stack track with the Class not found exception
Nov 13, 2008 10:36:54 AM
org.eclipse.birt.report.engine.script.internal.ScriptExecuto r addException
WARNING: Class
com._3esi.manage.report.core.handler.DefaultReportEventHandl er not found.
org.eclipse.birt.report.engine.api.EngineException: Class
com._3esi.manage.report.core.handler.DefaultReportEventHandl er not found.
at
org.eclipse.birt.report.engine.script.internal.ScriptExecuto r.getInstance(ScriptExecutor.java:133)
at
org.eclipse.birt.report.engine.script.internal.ScriptExecuto r.getInstance(ScriptExecutor.java:104)
at
org.eclipse.birt.report.engine.script.internal.ReportScriptE xecutor.handleInitialize(ReportScriptExecutor.java:43)
at
org.eclipse.birt.report.engine.api.impl.EngineTask.loadDesig n(EngineTask.java:1309)
at
org.eclipse.birt.report.designer.data.ui.util.DummyEngineTas k.run(DummyEngineTask.java:39)
at
org.eclipse.birt.chart.reportitem.ui.ReportDataServiceProvid er.getPreviewRowData(ReportDataServiceProvider.java:340)
at
org.eclipse.birt.chart.reportitem.ui.ReportDataServiceProvid er.getPreviewData(ReportDataServiceProvider.java:244)
at
org.eclipse.birt.chart.reportitem.ui.StandardChartDataSheet$ 4.run(StandardChartDataSheet.java:1040)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException:
com._3esi.manage.report.core.handler.DefaultReportEventHandl er
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:481)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:385)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at
org.eclipse.birt.report.engine.executor.ApplicationClassLoad er.loadClass(ApplicationClassLoader.java:77)
at
org.eclipse.birt.report.engine.script.internal.ScriptExecuto r.getInstance(ScriptExecutor.java:128)
... 8 more
|
|
|
Powered by
FUDForum. Page generated in 0.01364 seconds