Could Not Initialize Class Org. Apache. Poi. Xssf. Model. Sharedstringstable Error When Using Apache Poi

I'm getting the following error on my JAX-RS app

java.lang.NoClassDefFoundError: Could not initialize class org.apache.poi.xssf.model.SharedStringsTable

I think I'm getting the error on this line

            XSSFWorkbook workbook = new XSSFWorkbook();

I have the following libraries on the libs folder

poi-5.2.2.jar
poi-ooxml-5.2.2.jar
poi-ooxml-lite-5.2.2.jar
poi-scratchpad-5.2.2.jar

I'm running this application on Tomcat 9 on Java 11. Please advice to resolve this issue if possible

2
Alexander Ross

Alexander Ross

Gaming, Esports & Interactive Media Writer

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.

Share this article