Community
Participate
Working Groups
Build Identifier: 20100218-1602 java.lang.ClassCastException after osgi-bundle refresh: org.eclipse.birt.report.engine.executor.PageVariable cannot be cast to org.eclipse.birt.report.engine.executor.PageVariable' * before refresh my report will exported (to pdf) successful * after refresh throws the exception (the classname is the same but the classpath not) * @see birt-classcastexcetion.stacktrce.txt WHAT CAN I DO? I try udpate/refresh the following bundles: (same exception) * update org.eclipse.birt.report.engine * start org.eclipse.birt.report.engine * update org.eclipse.birt.report.engine.emitter.config * start org.eclipse.birt.report.engine.emitter.config * update org.eclipse.birt.report.engine.script.javascript * update org.eclipse.birt.report.engine.emitter.pdf * update org.eclipse.birt.report.engine.emitter.pdf.config * update de.ibacg.de.ibacg.framework.reporting.birt * update de.ibacg.cmfs.reporting.pwc INFO: osgi-bundle-state (before and after refresh): 4 ACTIVE de.ibacg.framework.reporting.ibaf_reporting_core_0.4.91.SNAPSHOT # my.report.schedule.api 23 ACTIVE de.ibacg.de.ibacg.framework.reporting.birt_0.4.91.SNAPSHOT # my birt impl of my.report.schedule.api. Init new ReportEngine. 27 ACTIVE org.eclipse.birt.report.engine.emitter.config_2.5.2.v20100208 35 ACTIVE org.eclipse.birt.report.engine_2.5.2.v20100210 Fragments=36 36 RESOLVED de.ibacg.cmfs.reporting.pwc.fragmentto.org.eclipse.birt.report.engine_1.9.901-SNAPSHOT Master=35 # Use ScriptedDataSetEventAdapter and this fragment extend the import-classpath of 'org.eclipse.birt.report.engine' 37 ACTIVE org.eclipse.birt.report.model_2.5.2.v20100127 41 ACTIVE org.eclipse.birt.report.engine.fonts_2.5.2.v20091224 64 ACTIVE org.eclipse.birt.report.engine.script.javascript_2.5.2.v20091224 112 ACTIVE org.eclipse.birt.report.data.adapter_2.5.2.v20100208 121 ACTIVE org.eclipse.birt.report.engine.emitter.pdf_2.5.2.v20100129 146 RESOLVED de.ibacg.cmfs.reporting.pwc.reports_1.9.901.SNAPSHOT Master=172 # This fragement contains the rptdesign files 172 ACTIVE de.ibacg.cmfs.reporting.pwc_1.9.901.SNAPSHOT Fragments=146 # Use de.ibacg.de.ibacg.framework.reporting.birt to call my my.report.schedule.api 177 ACTIVE org.eclipse.birt.report.engine.emitter.pdf.config_2.5.2.v20100208 Reproducible: Always Steps to Reproduce: 1. Impl. ScriptedDataSetEventAdapter into package my.scripted.dataset.event.adapter 2. Make a report with a simple DataSet.EventHandler (ScriptedDataSetEventAdapter) 3. Test report in designer (must run) 4. Extend import-packages from bundle=org.eclipse.birt.report.engine via fragment like this: Fragment-Host: org.eclipse.birt.report.engine Import-Package: my.scripted.dataset.event.adapter;resolution:=optional 5. Start an EclipseApplication with args(-consoleLog -console) 6. Schedule report-generation to pdf (must run) 7. Refresh the bundle which init the ReportEngine 8. Schedule report-generation again and the classcast exception passed (by me). QUICKFIX: Restart EclipseApplication and all works fine. But next bundle refresh force exception again.
Created attachment 198372 [details] Stacktrace of the classpath exception.
From the exception, this bug is caused by some class loading conflict after update/refresh. It's an issue of Eclipse.
Jan, Why can you update org.eclipse.birt.report.engine? It's declared as "singleton", this flag will prohibit the plugin from uninstall/reinstall.
(In reply to comment #3) > Jan, > > Why can you update org.eclipse.birt.report.engine? It's declared as > "singleton", this flag will prohibit the plugin from uninstall/reinstall. Thank's to Jun. I can update 'org.eclipse.birt.report.engine' because it`s an normal osgi-command. The osgi-flag 'singleton' indicates that maxima one bundle with this symbolic name will installed within the osg-container at runtime (@see http://www.osgi.org/download/r4v41/r4.core.pdf). INFO: I start my rcp-application headless with option '-console'. And than is each bundle updatable.
This bug might be caused by BIRT. Reopen it for further investigation.