primefaces / primefaces

Ultimate Component Suite for JavaServer Faces
http://www.primefaces.org
MIT License
1.78k stars 761 forks source link

PF10 DataExporter: xlsx export is failing #12703

Open Mag00n opened 3 hours ago

Mag00n commented 3 hours ago

Describe the bug

TLDR: Is there any known class loading issues / conflicts with poi 5.0 and pf10 / weblogic 12.2.1 ?

Hello, we recently upgraded from pf 6.3 to 10.0. Our P:dataexporter is failing with XLSX only (xls and pdf work fine).

We receive the following 2 errors when trying to export xlsx. The xmlOptions error comes first. If we return to the page and try again the shared strings table error comes.

javax.servlet.ServletException: org.apache.xmlbeans.XmlOptions.setUseDefaultNamespace(Z)Lorg/apache/xmlbeans/XmlOptions;

javax.servlet.ServletException: Could not initialize class org.apache.poi.xssf.model.SharedStringsTable

I have reviewed the maven dependency hierarchy and there are no conflicting version of poi coming from maven. xmlbeans 4.0.0 is coming from poi-ooxml 5.0.0 after excluding xml beans from weblogic bea directory.

Environment: Java 1.8 weblogic 12.2.1 pf / pfe 10

Relevant POM entries:

    <dependency>
        <groupId>org.primefaces</groupId>
        <artifactId>primefaces</artifactId>
        <version>10.0.0</version>
    </dependency>

    <dependency>
        <groupId>org.primefaces.extensions</groupId>
        <artifactId>primefaces-extensions</artifactId>
        <version>10.0.0</version>
    </dependency>
org.apache.poi poi 5.0.0 org.slf4j jcl-over-slf4j
    <dependency>
        <groupId>org.apache.poi</groupId>
        <artifactId>poi-ooxml</artifactId>
        <version>5.0.0</version>
        <exclusions>
            <exclusion>
                <artifactId>stax-api</artifactId>
                <groupId>stax</groupId>
            </exclusion>            
        </exclusions>
    </dependency>
com.github.librepdf openpdf 1.3.23
    <!-- iText -->
    <dependency>
        <groupId>com.lowagie</groupId>
        <artifactId>itext</artifactId>
        <version>2.1.7</version>
    </dependency>
com.oracle.weblogic weblogic-server-pom 12.2.1-0-0 pom provided com.oracle.weblogic com.bea.core.xml.xmlbeans com.oracle.weblogic com.bea.core.xml.beaxmlbeans com.oracle.weblogic com.bea.core.xquery.xmlbeans-interop_1.8.0.0 ### Reproducer export a p:datatable using p:dataExporter with xlsx file type ### Expected behavior Exporting should be successful as it is with xls and pdf file type ### PrimeFaces edition Community ### PrimeFaces version 10.0.0 ### Theme _No response_ ### JSF implementation Mojarra ### JSF version 2.1 ### Java version 1.8 ### Browser(s) _No response_
tandraschko commented 3 hours ago

sorry but we dont support 10.0 anymore, its already over 3 years old. check the docs for the right poi version

otherwise i can just suggest you to use 14.0

Mag00n commented 3 hours ago

We are using the poi version indicated in the docs. And 14 is not compatible with java 1.8

tandraschko commented 3 hours ago

there must be a xmlbeans conflict somehow but i cant help further sorry, im sure its working fine on jetty e.g. and somehow related to your project/your application server

melloware commented 2 hours ago

If you need Java 8 then use 13.0.10 version