Project: Birt
Bug 123523 Previewing a scripted data set mapped to a java event handler throws NPE
Reported: 2006-01-11 18:56:12 | Status: resolved fixed

When previewing a scripted data set we try to get a class loader from the ExecutionContext. (See ScriptExecutor.getClassUsingCustomClassPath). The context will be null in this case. The reason for using the context is to use cached class loaders when possible. Need to use some other mechanism to get the class loader if the context is null. We can either provide an external map to use as cache, or not bother with caching at all.

Files changed in fix:
engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/script/element/IReportItem.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/script/element/IRow.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/script/eventadapter/ScriptedDataSetEventAdapter.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/script/eventadapter/ScriptedDataSourceEventAdapter.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/script/eventhandler/IScriptedDataSetEventHandler.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/script/eventhandler/IScriptedDataSourceEventHandler.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/script/instance/ICellInstance.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/script/instance/IDataItemInstance.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/script/instance/IReportElementInstance.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/script/instance/IReportItemInstance.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/executor/ExecutionContext.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/script/internal/DataSetScriptExecutor.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/script/internal/DataSourceScriptExecutor.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/script/internal/ReportContextImpl.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/script/internal/ScriptDataSetScriptExecutor.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/script/internal/ScriptDataSourceScriptExecutor.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/script/internal/ScriptExecutor.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/script/internal/instance/CellInstance.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/script/internal/instance/DataItemInstance.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/script/internal/instance/ReportElementInstance.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/script/internal/instance/ReportItemInstance.java