Hi,

Is there more output? Especially which class it cannot load while
initializing SharedStringsTable and some code-snippet that is used to
trigger the problem?

When I try to read and write a simple XSLX-file via Gradle it works fine
with the following excludes:

configurations {
    compile {
        exclude group: 'com.github.virtuald'
        exclude group: 'xml-apis'
        exclude group: 'org.apache.xmlgraphics'
        exclude group: 'org.apache.santuario'
        exclude group: 'org.bouncycastle'
        exclude group: 'org.apache.pdfbox'
        exclude group: 'de.rototor.pdfbox'
    }
}

Dominik.


On Mon, May 24, 2021 at 3:29 PM Steve Lopez <st...@regattacentral.com>
wrote:

> Thank you for the quick reply. unfortunately I get the following error
> after adjusting the pom
>
> Caused by: java.lang.NoClassDefFoundError: Could not initialize class
> org.apache.poi.xssf.model.SharedStringsTable
>
> My updated pom has the following for POI (and war file increased about 6MB
> compared with POI 4.1.2)
>
> <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>
>                         <exclusions>
>                                 <exclusion>
>                                         <groupId>xml-apis</groupId>
>                                         <artifactId>xml-apis</artifactId>
>                                 </exclusion>
>                                 <exclusion>
>                             <groupId>org.apache.xmlgraphics</groupId>
>                             <artifactId>batik-all</artifactId>
>                                 </exclusion>
>                                 <exclusion>
>                                     <groupId>org.apache.santuario</groupId>
>                                     <artifactId>xmlsec</artifactId>
>                                 </exclusion>
>                                 <exclusion>
>                                     <groupId>org.bouncycastle</groupId>
>                                     <artifactId>*</artifactId>
>                                 </exclusion>
>                                 <exclusion>
>                                     <groupId>org.apache.pdfbox</groupId>
>                                     <artifactId>pdfbox</artifactId>
>                                 </exclusion>
>                         </exclusions>
>                 </dependency>
>
> On 2021/05/21 12:30:01, Yegor Kozlov <yegor.koz...@gmail.com> wrote:
> > Adding the following exclusions should make your war smaller:
> >
> > <exclusion>
> >     <groupId>org.apache.xmlgraphics</groupId>
> >     <artifactId>batik-all</artifactId>
> > </exclusion>
> > <exclusion>
> >     <groupId>org.apache.santuario</groupId>
> >     <artifactId>xmlsec</artifactId>
> > </exclusion>
> > <exclusion>
> >     <groupId>org.bouncycastle</groupId>
> >     <artifactId>*</artifactId>
> > </exclusion>
> > <exclusion>
> >     <groupId>org.apache.pdfbox</groupId>
> >     <artifactId>pdfbox</artifactId>
> > </exclusion>
> >
> > Apache Batik is only required to render WMF/EMF images.
> > Apache XML Security for Java and Bouncy Castle are only required to sign
> or
> > validate signed Office documents.
> > PDFBox is only required to render to PDF documents. The required jars can
> > be downloaded from:
> >
> > Core XLSX generation should work fine without them.
> >
> > Yegor
> >
> > On Thu, May 20, 2021 at 7:27 PM Steve Lopez <st...@regattacentral.com>
> > wrote:
> >
> > > Upgrading from v4.1 to 5.0 has resulted in an additional 24MB of
> > > dependencies.  This adds significant bulk to our war file and
> difficult to
> > > believe it is correct.
> > >
> > > it looks like the majority of this bloat is from from batik.   Is
> there a
> > > build or version that allows removing all of this without jeopardizing
> core
> > > XLSX generation?
> > >
> > > This is the pom being used (Old v4)
> > >
> > >         <groupId>org.apache.poi</groupId>
> > >                         <artifactId>poi</artifactId>
> > >                         <version>4.1.2</version>
> > >                 </dependency>
> > >                 <dependency>
> > >                         <groupId>org.apache.poi</groupId>
> > >                         <artifactId>poi-ooxml</artifactId>
> > >                         <version>4.1.2</version>
> > >                         <exclusions>
> > >                                 <exclusion>
> > >                                         <groupId>xml-apis</groupId>
> > >
>  <artifactId>xml-apis</artifactId>
> > >                                 </exclusion>
> > >                         </exclusions>
> > >                 </dependency>
> > >
> > > And upgrading to 5 (resulting in addl 24MB of jars!)
> > >
> > >         <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>
> > >                         <exclusions>
> > >                                 <exclusion>
> > >                                         <groupId>xml-apis</groupId>
> > >
>  <artifactId>xml-apis</artifactId>
> > >                                 </exclusion>
> > >                         </exclusions>
> > >                 </dependency>
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscr...@poi.apache.org
> > > For additional commands, e-mail: user-h...@poi.apache.org
> > >
> > >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@poi.apache.org
> For additional commands, e-mail: user-h...@poi.apache.org
>
>

Reply via email to