Intermittent Class Loading issues for ScriptedDataSetEventHandler in MBIRT 20.4

AbhijitSingh
AbhijitSingh Member
edited February 11, 2022 in Analytics #1

We are using ScriptedDataSetEventHandlers for loading data in report elements like table and for dynamic parameters list but with a version upgrade from iHub16.0.1 to MBIRT20.4 there are intermittent issues in loading class for scripted event handlers. Jars which includes the classes for extended ScriptedDataSetEventHandlers are placed at /InformationHub/modules/BIRTiHub/iHub/web/birtservice/WEB-INF/lib/,

Same jars & classes are working fine with ihub16.0.1

[Thread 337, <hostname datetime> org.eclipse.birt.report.engine.script.internal.ScriptExecutor.addException()

WARNING: Class com.custom.CustomScriptedDataSetHandler not found.org.eclipse.birt.report.engine.api.EngineException: Class com.custom.CustomScriptedDataSetHandler not found.

    at org.eclipse.birt.report.engine.executor.EventHandlerManager.loadClass(EventHandlerManager.java:104)

    at org.eclipse.birt.report.engine.executor.EventHandlerManager.getInstance(EventHandlerManager.java:75)

    at org.eclipse.birt.report.engine.script.internal.ScriptExecutor.getInstance(ScriptExecutor.java:203)

    at org.eclipse.birt.report.engine.script.internal.DataSetScriptExecutor.initEventHandler(DataSetScriptExecutor.java:79)

    at org.eclipse.birt.report.engine.script.internal.ScriptDataSetScriptExecutor.initEventHandler(ScriptDataSetScriptExecutor.java:76)

    at org.eclipse.birt.report.engine.script.internal.DataSetScriptExecutor.handleBeforeOpen(DataSetScriptExecutor.java:99)

    at org.eclipse.birt.data.engine.impl.DataSetRuntime.beforeOpen(DataSetRuntime.java:574)

    at org.eclipse.birt.data.engine.impl.QueryExecutor.dataSetBeforeOpen(QueryExecutor.java:217)

    at org.eclipse.birt.data.engine.impl.QueryExecutor.prepareExecution(QueryExecutor.java:329)

    at org.eclipse.birt.data.engine.impl.PreparedQuery.doPrepare(PreparedQuery.java:464)

    at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.produceQueryResults(PreparedDataSourceQuery.java:190)

    at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.execute(PreparedDataSourceQuery.java:178)

    at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.execute(DataRequestSessionImpl.java:660)

    at com.actuate.birt.report.engine.internal.datamart.DatamartRunTask.executeDataSet(DatamartRunTask.java:573)

    at com.actuate.birt.report.engine.internal.datamart.DatamartRunTask.executeSingleDataOjbect(DatamartRunTask.java:348)

    at com.actuate.birt.report.engine.internal.datamart.DatamartRunTask.run(DatamartRunTask.java:228)

    at com.actuate.birt.data.interceptors.datamart.DataSetInterceptor.generateDataSet(DataSetInterceptor.java:945)

    at com.actuate.birt.data.interceptors.datamart.DataSetInterceptor.processLinkedDataset(DataSetInterceptor.java:597)

    at com.actuate.birt.data.interceptors.datamart.DataSetInterceptor.preDefineDataSet(DataSetInterceptor.java:234)

    at org.eclipse.birt.report.data.adapter.impl.DefineDataSourceSetUtil.prepareForTransientQuery(DefineDataSourceSetUtil.java:255)

    at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.defineDataSourceDataSet(DataRequestSessionImpl.java:2175)

    at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.prepare(DataRequestSessionImpl.java:480)

    at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.prepare(DataRequestSessionImpl.java:696)

    at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.doPrepareQuery(AbstractDataEngine.java:237)

    at org.eclipse.birt.report.engine.data.dte.DteDataEngine.doPrepareQuery(DteDataEngine.java:271)

    at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.prepare(AbstractDataEngine.java:193)

    at com.actuate.birt.report.engine.internal.ActuateGenerationEngine.prepare(ActuateGenerationEngine.java:53)

    at org.eclipse.birt.report.engine.executor.ReportExecutor.execute(ReportExecutor.java:122)

    at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportExecutor.execute(WrappedReportExecutor.java:60)

    at org.eclipse.birt.report.engine.internal.executor.emitter.ReportEmitterExecutor.execute(ReportEmitterExecutor.java:70)

    at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportExecutor.execute(WrappedReportExecutor.java:60)

    at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplciateReportExecutor.execute(SuppressDuplciateReportExecutor.java:42)

    at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportExecutor.execute(WrappedReportExecutor.java:60)

    at org.eclipse.birt.report.engine.internal.executor.l18n.LocalizedReportExecutor.execute(LocalizedReportExecutor.java:61)

    at org.eclipse.birt.report.engine.presentation.ReportDocumentBuilder.build(ReportDocumentBuilder.java:234)

    at org.eclipse.birt.report.engine.api.impl.RunTask.doRun(RunTask.java:274)

    at org.eclipse.birt.report.engine.api.impl.RunTask.run(RunTask.java:115)

    at com.actuate.reportapi.engine.birt.ReportGenerationTask.runTask(ReportGenerationTask.java:1156)

    at com.actuate.reportapi.engine.birt.ReportGenerationTask.generateReport(ReportGenerationTask.java:212)

    at com.actuate.reportapi.engine.ReportGenerationTaskBase.doTask(ReportGenerationTaskBase.java:154)

    at com.actuate.reportapi.engine.Task.execute(Task.java:340)

    at com.actuate.reportapi.enginemanager.ControlRunnable.runTask(ControlRunnable.java:84)

    at com.actuate.reportapi.enginemanager.ControlRunnable.run(ControlRunnable.java:38)

    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

    at java.lang.Thread.run(Thread.java:745)

Caused by: java.lang.ClassNotFoundException: com.custom.CustomScriptedDataSetHandler

    at org.eclipse.birt.core.framework.URLClassLoader.findClass1(URLClassLoader.java:186)

    at org.eclipse.birt.core.framework.URLClassLoader$1.run(URLClassLoader.java:154)

    at org.eclipse.birt.core.framework.URLClassLoader$1.run(URLClassLoader.java:1)

    at java.security.AccessController.doPrivileged(Native Method)

    at org.eclipse.birt.core.framework.URLClassLoader.findClass(URLClassLoader.java:149)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

    at org.eclipse.birt.report.engine.executor.ApplicationClassLoader.loadClass(ApplicationClassLoader.java:94)

    at org.eclipse.birt.report.engine.executor.EventHandlerManager.loadClass(EventHandlerManager.java:99)

    ... 45 more