NoClassDefFoundError on org.apache.poi.xssf.usermodel.XSSFWorkbookType in AEM 6.5.16 service pack
I am upgrading the uber jar version to 6.5.15 after upgrading the version I was getting a compilation error before. I followed https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/cannot-access-org-apache-poi-ooxml-poixmldocument-with-latest/m-p/589973#M147300 and resolved the compilation issue. But after fixing the compilation issue I am getting below error message.
GetFolderDetails.validateFolderName:321 Unexpected exception thrown: java.lang.NoClassDefFoundError: Could not initialize class org.apache.poi.xssf.usermodel.XSSFWorkbookType
This error was not appeared before, it started coming up after uber jar versions change. When I checked the java class I found that
XSSFWorkbook is having problem. I see below code
Workbook workbook = new org.apache.poi.xssf.usermodel.XSSFWorkbook(); ////java.lang.NoClassDefFoundError: Could not initialize class org.apache.poi.xssf.usermodel.XSSFWorkbookType
Dependecies I have included in pom.xml
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>5.2.3</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>5.2.3</version>
</dependency>
<dependency>
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans</artifactId>
<version>5.1.1</version>
</dependency>
Any idea whyXSSFWorkbook class is unable to initialize class org.apache.poi.xssf.usermodel.XSSFWorkbookType?

