Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350006 - PageVariable classcast-exception after osgi-bundle-refresh
Summary: PageVariable classcast-exception after osgi-bundle-refresh
Status: REOPENED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 minor (vote)
Target Milestone: Future   Edit
Assignee: Birt-ReportEngine-inbox@eclipse.org CLA
QA Contact: Xiaoying Gu CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-22 02:59 EDT by jan CLA
Modified: 2011-07-21 18:18 EDT (History)
3 users (show)

See Also:


Attachments
Stacktrace of the classpath exception. (7.49 KB, text/plain)
2011-06-22 03:01 EDT, jan CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description jan CLA 2011-06-22 02:59:59 EDT
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.
Comment 1 jan CLA 2011-06-22 03:01:14 EDT
Created attachment 198372 [details]
Stacktrace of the classpath exception.
Comment 2 Jun Ouyang CLA 2011-06-28 03:24:45 EDT
From the exception, this bug is caused by some class loading conflict after update/refresh.

It's an issue of Eclipse.
Comment 3 Jun Ouyang CLA 2011-06-28 23:37:04 EDT
Jan,

Why can you update org.eclipse.birt.report.engine? It's declared as "singleton", this flag will prohibit the plugin from uninstall/reinstall.
Comment 4 jan CLA 2011-06-29 02:53:36 EDT
(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.
Comment 5 Jun Ouyang CLA 2011-07-03 21:47:25 EDT
This bug might be caused by BIRT. Reopen it for further investigation.