Community
Participate
Working Groups
Build Identifier: Helios 3.6 I tried to use JAXB for the creation of the Javaobjects using XML. My steps are get Dataset from DB -> create XML object on the fly -> Use JAXB marshalling and fill the JavaObjects. Now when I use the jar (which i have created to do above metion entire process) during OPEN event of the Scripted Dataset,it behaves very weird, When I click on DATASET and click on "result preview" I see the Data coming correctly from the JavaObject. But as soon as I move to the Eclipse Report preview I see no data only table header is coming. I also tried logging the details and I clearly see the List size it shows ZERO when I use the Report Preview whereas when I do a dataset result preview I get X value. Reproducible: Always Steps to Reproduce: 1.Create a XSD from a simple RPTDESIGN XML file. 2. write code to get data from database and now convert the dataset to XML using transformation 3. Now use JAXB marshalling approach to fill the data from XML to JAVA objects. 4. create the jar file and export it with the all dependencies. 5. I am using JTDS for connection and I am using MS SQL DB 6. Go to eclipse helios 3.6, create a report project add a report. 7. create a Datasource by selecting Scripted datasource option. 8. create dataset, add colunms and write code in the open event to get the data from jar method 9. now in dataset FETCH add code to fill the columns. 10. now try Dataset preview and you will be able to see the values in that. 11. now drag and drop the Table and all the columns from dataset. 12. Now click on eclipse Preview and it will not show any thing just the report headers.
Created attachment 201776 [details] Stacktrace and code used in OPEN And FETCH event
Created attachment 201777 [details] Screenshot for dataset
Created attachment 201778 [details] Screenshot of Report PREVIEW
Jason Weathersby has helped me alot to try this issue, but finally after trying all the possibility, he has suggested that I should be creating a ticket. Also I have not seen any questions on JAXB on the birt site, there are very few questions and no one has tried java objects using JAXB. whereas othe simple javaobjects are working fine if I do not use the JAXB.
From the error stack, the java.lang.IndexOutOfBoundsException is thrown from user's script, Please check the opee() script. Could you please tell us the version number of birt? By the way, the dataset preview may different with the report preview, since the dataset preview is not a precise result