[#13491] - Compatibility Issue with poi jar : latest poi jar with jasperreports-6.16.0

Category:
Bug report
Priority:
High
Status:
Feedback Requested
Project: Severity:
Critical
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:
1

Hello Team,

We are Blocked on third party upgrade for poi jar due to Jasper Library Dependency.

Here is Detail :

We are using Jasper Reporting Library Version : jasperreports-6.16.0
It is working with a older version of poi jar : 4.1.2
We want to upgrade poi jar to latest.
But New Version is not compatible with Jasper Library.

Can we have a fix here or any work around to upgrade poi jar ?

Below is error log after poi Upgrade :

java.lang.NoSuchMethodError: org.apache.poi.hssf.usermodel.HSSFFont.getIndex()S
at net.sf.jasperreports.engine.export.JRXlsExporter$StyleInfo.computeHash(JRXlsExporter.java:2650)
at net.sf.jasperreports.engine.export.JRXlsExporter$StyleInfo.<init>(JRXlsExporter.java:2640)

Thanks in advance
Bhansali

v6.16
jasper library
bhansali.mukesh's picture
Joined: Oct 29 2019 - 3:09am
Last seen: 1 week 3 days ago

5 Comments:

#1
  • Status:New» Assigned
  • Assigned:nobody» teodord
#2
  • Status:Assigned» Feedback Requested

I'm afraid there is no easy solution for this.
POI has changed the return type of that method from short to int.
If we compile against POI 4.1.2 (as we do today), it does not work with POI 5.0.0.
And if we would compile against POI 5.0.0, it would no longer work with POI 4.1.2.

I made preparations for JRL to be compilable with POI 5.0.0 and I suggest you take the source code of JasperReports and compile it against POI 5.0.0 on your side, by changing the version in the ivy.xml file or in the pom.xml, depending which build tool you prefer: Ant or Maven.

I hope this helps.
Teodor

#3
  • Assigned:nobody»

"I made preparations for JRL to be compilable with POI 5.0.0"
Is this already part of the latest jasper release?

#4

Teodor was referring to this commit https://github.com/TIBCOSoftware/jasperreports/commit/7934c2e9cfaa6d31d6..., which is included in JasperReports 6.17.0.

Note that as previously stated, the published JasperReports jar is still compiled with POI 4.1.1 and will not work with POI 5 since it has a method that's not binary backwards compatible. If you want to use JasperReports with POI 5 you'll have to checkout/download the source, change the version in pom.xml and/or ivy.xml and rebuild the JasperReports jar.

Regards,
Lucian

#5

It would be good to understand the roadmap here for POI (as well as other libraries). A critical component to using JasperReports Library is its compatibility with libraries that are used in broader context. Keeping up with releases is important for functionality as well as security compliance.

Feedback
randomness