| Summary: | ODA Driver Reports produce errors in BIRT Report Viewer | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | John Conlon <jconlon> | ||||
| Component: | Core | Assignee: | Ed Merks <Ed.Merks> | ||||
| Status: | RESOLVED WONTFIX | QA Contact: | Kenn Hussey <Kenn.Hussey> | ||||
| Severity: | enhancement | ||||||
| Priority: | P3 | ||||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
John Conlon
Created attachment 204226 [details]
ReportViewer Error with stack
Silly question, but have you confirmed whether the class is included in the BIRT engine's class loading path? Other clients have used the dataset in RCP applications without issues... (In reply to comment #2) > Silly question, but have you confirmed whether the class is included in the > BIRT engine's class loading path? Other clients have used the dataset in RCP > applications without issues... No, it's a good question. Have previously worked with the interim org.eclipse.datatools.enablement.oda.ecore Drivers that did not require the users to add any driver or model jars to the Report Execution path. And yes, to avoid this error it is necessary (like the message suggests) to add the org.eclipse.emf.oda.ecore to the Report Execution path in the Report Design user preferences. Also one must add and all the model plugins that are used in the report or the user will see a similar error. Like the previous interim driver, is there a way to avoid requiring a user of an RCP EMF/BIRT app to manually configure the driver by setting the paths to what could be more than a handful of jars? Hmm, I'm not that familiar with the other driver (it was developed by the Data Tools team), but I'll look into it and see what we can do... Have discovered this bug is more subtle than I have described. The appearance of this error message depends on the model, the dataset, and the bindings of report items to certain columns of the dataset. 1. In the report if the Data Type in the Data Column Bindings are simple types than the report can be run without the org.eclipse.emf.oda.ecore jar on the classpath. 2. However if the Data Type in the Data Column Bindings are Java Object, then the org.eclipse.emf.oda jar needs to be on the classpath. 3. If the Java Object is an EMF model specific EEnumerator the model jar also needs to be on the classpath. This is reproducible with the Extended Library model. Steps: ---------- Simple data types ----------- 1. Create a extlibrary model instance document with a Library as the root element. 2. On the Library document set something for the name and an address properties. (thats all you will need) 3. Create a blank report and add a datasource pointing to the model instance document and a dataset with the values: Context Type: extlibrary.Library Query Text: self Result Type: extlibrary.Library Note the data types of the Output columns. The only two that are not Objects are Strings - name and address. 4. Add a two column table to the report, and add the name and address columns from the dataset to each of the report columns. (The table bindings should only have listings for these two.) 5. With NO CLASSPATH Settings, Run the report and it should display in the browser with NO ERRORS. ---------- Java Object data type ----------- 6. Add a binding to the table to the dataset books column. No need to change the appearance of the table a binding to books is enough. 8. With NO CLASSPATH Settings, Run the report. It should display ERRORS in the browser. -> A report document error occurred when loading: Result Data. Failed to load class "org.eclipse.emf.oda.ecore.impl.ResultSet$JavaObject" for "EJavaObject" type column "books". please make sure class "org.eclipse.emf.oda.ecore.impl.ResultSet$JavaObject" is included in BIRT engines class loading path. org.eclipse.emf.oda.ecore.impl.ResultSet$JavaObject (Element ID:9) 9. In the User Preference Report Design Classpath Add a reference to the org.eclipse.emf.oda.ecore.ecore (You will have to find it in the plugins directory) Run the report and it should display in the browser with NO ERRORS. ---------- Java Object is a EEnumerator ----------- 10. Add a book to the model document. 11. Create a new dataset to retrieve all the books: Context Type: extlibrary.Library Query Text: books Result Type: extlibrary.Book 12. Delete old table and add a new one for books. (Just drag the whole books dataset to the report) 13. Run the report: -> A report document error occurred when loading: Result Data. Failed to load class "org.eclipse.emf.examples.extlibrary.BookCategory" for "EEnumerator" type column "category". please make sure class "org.eclipse.emf.examples.extlibrary.BookCategory" is included in BIRT engines class loading path. org.eclipse.emf.examples.extlibrary.BookCategory (Element ID:132) 14. To get rid of this error you will have to add the org.eclipse.emf.examples.extlibrary jar to the classpath Note, that I also started a BIRT mailist discussion on this issue: http://www.eclipse.org/forums/index.php/m/765227/ Looking at the long discussion thread, I wonder if there is really a problem with EMF's ODA driver or if this purely a classpath problem with BIRT? At the request of Jason Weathersby I have opened up a BIRT https://bugs.eclipse.org/bugs/post_bug.cgi that references this one. Let's try that again. Here is the new BIRT https://bugs.eclipse.org/bugs/show_bug.cgi?id=375995 I'm not sure there's anything to do here. |