Problems with apache poi ooxml

UI Components for JSF
Post Reply
mjordanav
Posts: 11
Joined: 07 Jul 2021, 13:59

18 Oct 2021, 13:04

Hi! I am using to diferent primefaces components to print data:
  • dataExporter
  • fileDownload
The problem is if I want to use the dataExporter component I need this dependencies

Code: Select all

<dependency>
	<groupId>org.apache.poi</groupId>
	<artifactId>poi</artifactId>
	<version>5.0.0</version>
</dependency>
<dependency>
	<groupId>org.apache.poi</groupId>
	<artifactId>poi-ooxml</artifactId>
	<version>5.0.0</version>
</dependency>
because without it, the following error is triggered:
Caused by: ExceptionConverter: com.lowagie.text.DocumentException: Font 'Times-Roman' with 'UTF-8' is not recognized.
However, if I use this dependency the fileDownload compoent doesn't work. It triggers the following error:
Error exporting from DOCX to PDFjava.lang.NoSuchMethodError: org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPPrDefault.getPPr()Lorg/openxmlformats/schemas/wordprocessingml/x2006/main/CTPPrGeneral;
Last edited by mjordanav on 19 Oct 2021, 09:37, edited 1 time in total.

mjordanav
Posts: 11
Joined: 07 Jul 2021, 13:59

19 Oct 2021, 09:36

I solved using the dependecy version 4:

Code: Select all

<dependency>
	<groupId>org.apache.poi</groupId>
	<artifactId>poi</artifactId>
	<version>4.0.0</version>
</dependency>
<dependency>
	<groupId>org.apache.poi</groupId>
	<artifactId>poi-ooxml</artifactId>
	<version>4.0.0</version>
</dependency>
It looks like apache poi 5.0.0 is not compatible with poi-ooxml 5.0.0

Melloware
Posts: 3716
Joined: 22 Apr 2013, 15:48

19 Oct 2021, 18:59

It should work fine I use 5.0.0 in all my PROD apps.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 18 guests