Problem with XLSX-Export

Questions and answers on developing, deploying and using plugins and JavaBeans

Problem with XLSX-Export

Postby rieder » Wed Aug 05, 2020 10:56 am

Hi

We plan migrating to Servoy 2020-03 LTS. So far, everything works fine, except XLSX-Exports: Writing the workbook to file stops at
Code: Select all
this.wb.write(fileOut);

Format XLS works. I did read all the online information about versions and compatibility and:
  • installed Servoy JasperReports Plugin 6.4.1 2019.12 (for Jasper Plugin 6.4.1 and Servoy >= Version 2019.12).
  • downloaded the referenced poi-Libraries and copied them to poi folder.
  • added the mentioned line under resources in jnlp file.
  • updated solutions svyUtils and svyUtilsExcel (with package manager)

Can anybody pleas give advice, what the problem might be?

Thank you!
Birgit Rieder
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
rieder
 
Posts: 141
Joined: Thu Jan 26, 2012 5:18 pm

Re: Problem with XLSX-Export

Postby patrick » Wed Aug 05, 2020 11:49 am

for Servoy 2020.03 or later you should use the latest Jasper plugin (6.12.2) and the POI mentioned on the wiki page. Not sure why you used everything that is necessary for 2019.12, but I specifically added info for 2020.03.
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3692
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Re: Problem with XLSX-Export

Postby rieder » Wed Aug 05, 2020 12:06 pm

Hi Patrick

Thank you for the response. You ask why? Your Info on https://github.com/Servoy/svyUtils/wiki/ExcelUtils says:
… [Package]_v.6.4.1_2019.12.1 (Servoy version >= 2019.12.1)

We use Jasper Library 4.6.1 and Servoy >= 2019.12.1. The Link to the poi in this chapter downloads 3.15.

Best regards
Birgit
Birgit Rieder
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
rieder
 
Posts: 141
Joined: Thu Jan 26, 2012 5:18 pm

Re: Problem with XLSX-Export

Postby patrick » Wed Aug 05, 2020 12:54 pm

and above it says: Servoy versions 2020.03 and greater...

anyway: does it work now?
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3692
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Re: Problem with XLSX-Export

Postby rieder » Wed Aug 05, 2020 2:27 pm

In the attached screenshot I read:

1. Version 2020-03 of Servoy or higher AND Jasper Plugin 6.12.2 or later.
This does not fit, since we still use Jasper Reports Library 6.4.1

2. Version 2019-12 of Servoy or higher AND Jasper Plugin 6.4.1.
This is, what we currently have installed.

You asked, if it works now? I did try the newer Poi-Libraries (4.1.1, link under 1.) together with Servoy Jasper Reports Plugin for Servoy 2019-12 or higher. It works actually (reports and xlsx-Export), as far as I can tell after the first tests. But I would feel much better, if you could confirm this constellation? Since mixing versions against the documentation (as I read it), does not make me feel comfortable. Otherwise we also must upgrade to Jasper Reports Library 6.12.2 (or later)?

Thank you and best regards
Birgit
Attachments
jasperPluginAndPoi.png
jasperPluginAndPoi.png (105.32 KiB) Viewed 1273 times
Birgit Rieder
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
rieder
 
Posts: 141
Joined: Thu Jan 26, 2012 5:18 pm

Re: Problem with XLSX-Export

Postby patrick » Wed Aug 05, 2020 3:21 pm

I do recommend you use the latest version of the jasper plugin. The poi library used by the excel scope is shipped with the jasper plugin and Servoy (used by the excel export plugin). So when you use an older Jasper plugin the version of the poi that comes with it might be different than the one Servoy ships with its core plugins. That could lead to unwanted results, because you and we have no influence to what is actually loaded (used) then. To add to that, the excel scope uses some additional libraries needed for xlsx (the ones in the poi directory). These should also match the poi core library.

So the whole fuss at the end is about that you want matching poi libraries in

plugins/jakarta-poi (jakarta-poi.jar, used by Servoy's excel plugin)
plugins/servoy_jasperreports (poi-xxx.jar used by the Jasper plugin)
plugins/poi (additional libraries for any poi.jar to support xslx)

To add to the confusion, different versions of the code in the excel scope work only with a matching library, because Apache tends to rename, deprecate and remove stuff in quite an agile way. And lastly, Servoy signs libraries (with a code signing certificate) and mixing Jasper, Servoy and POI may lead to different code signatures, because the signing certificate needs to be updated once in a while (happened last in 2019.12.1).

I hope that makes it all perfectly clear :D
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3692
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Re: Problem with XLSX-Export

Postby rieder » Wed Aug 05, 2020 5:12 pm

Hi Patrick

Thank you for the detailed answer, which includes the involved folders and libraries and explains a bit the complexity of the loading mechanism and version conflicts.
Though, I guess, we should use the Servoy_JasperReports_Plugin_v.6.12.2_2020.03. And upgrade to JasperReports Library 6.12.2. I'm not sure, if the reports need recompilation.

Best regards
Birgit
Birgit Rieder
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
rieder
 
Posts: 141
Joined: Thu Jan 26, 2012 5:18 pm


Return to Plugins and Beans

Who is online

Users browsing this forum: No registered users and 6 guests