wingfield65 Posted November 17, 2023 Share Posted November 17, 2023 new user here. downloaded jaspersoft studio 6.20.6. created new project. created new report. tried to start with excel data adapter. got below error. appreciate any thoughts on how to get this to work. class net.sf.jasperreports.fastexcel.FastExcelDataSource cannot be cast to class net.sf.jasperreports.engine.data.ExcelDataSource (net.sf.jasperreports.fastexcel.FastExcelDataSource and net.sf.jasperreports.engine.data.ExcelDataSource are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @5d026573) Link to comment Share on other sites More sharing options...
wingfield65 Posted November 19, 2023 Author Share Posted November 19, 2023 I'm just going to assume it's broken, since no response. I'll move on to .csv and see if that works. Link to comment Share on other sites More sharing options...
Mehak Rajkumar Posted November 20, 2023 Share Posted November 20, 2023 Thank you for posting to the Jaspersoft Community. Our team of experts has read your question and we are working to get you an answer as quickly as we can. If you have a Jaspersoft Professional Subscription plan, please visit https://support.tibco.com/s/ for direct access to our technical support teams offering guaranteed response times. Link to comment Share on other sites More sharing options...
Badr Draifi Posted November 27, 2023 Share Posted November 27, 2023 This actually might be a bug. Could you please post the steps to reproduce the issue? We will open a ticket for it. Thanks Link to comment Share on other sites More sharing options...
mark.muhammad Posted November 30, 2023 Share Posted November 30, 2023 Hello, I'm facing similar problem using the same version of Jaspersoft Studio. I believe what I did was similar to what @wingfield65 did, but just in case it is not, here is what I did. In the New Report Wizard's Data Source section I created new data adapter. In the Data Adapter Wizard which popped-up afterward, I selected Microsoft Excel and then I selected the file. Everything worked fine in this wizard, I could see the column names of my source file. However after returning to New Report Wizard and click Next, an error dialog popped. At first, I had a column containing image in its cells which I thought was the cause. However, even after removing the image, it still failed. If it really is a bug, I hope it can be addressed soon. Thank you Link to comment Share on other sites More sharing options...
Mehak Rajkumar Posted December 1, 2023 Share Posted December 1, 2023 @wingfield65 Could you please post your steps to reproduce the issue? Link to comment Share on other sites More sharing options...
Massimo Rabbi Posted December 1, 2023 Share Posted December 1, 2023 Hi, the problem you are verifying it's actually a bug in the latest version 6.20.6 where the new FastExcel library was added, besides the "standard" POI. A fix will be available in the next release. Since the exception is triggered during the "read fields" operation, you might need to create the initial report using another DA, for example the "empty" one. Later add manually the fields in the report with the same names of the columns you added manually or automatically read in the Excel data adapter. This workaround should allow you to use the XLS DA to run the report preview. Best regards, Massimo. Link to comment Share on other sites More sharing options...
Massimo Rabbi Posted December 1, 2023 Share Posted December 1, 2023 Hi, another more clean solution is to force the following JR property in the Jaspersoft Studio preferences. This will allow you to use the old POI data source and be able to create the report as usual without triggering the exception. net.sf.jasperreports.xlsx.data.source.factory = net.sf.jasperreports.engine.data.ExcelDataSourceFactory See the attached image as well. Best regards, Massimo. 1 Link to comment Share on other sites More sharing options...
wingfield65 Posted December 3, 2023 Author Share Posted December 3, 2023 the steps were posted in my original post. not sure what else I can add. Link to comment Share on other sites More sharing options...
Massimo Rabbi Posted December 4, 2023 Share Posted December 4, 2023 11 hours ago, wingfield65 said: the steps were posted in my original post. not sure what else I can add. Did you give it a try to my information above? Regards, Massimo. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now