Experience League Showcase
Read real-world use cases of Experience Cloud products written by your peers
Adobe Feedback Program
Influence Adobe product development
COMMUNITIES BY PRODUCT
Advertising
Analytics
Audience Manager
Campaign Classic v7 & Campaign v8
Campaign Standard
Developer
Experience Cloud
Experience Manager Sites & More
Experience Platform
Journey Optimizer
Target
Real-Time Customer Data Platform
Workfront
Marketo Engage
Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
Read More & Register today!
I am facing compilation error after upgrading uber jar version from 6.5.0 to 6.5.15.
Updated Uber jar
<dependency>
<groupId>com.adobe.aem</groupId>
<artifactId>uber-jar</artifactId>
<version>6.5.15</version>
<scope>provided</scope>
</dependency>
After updated uber I tried to compile the code but ended up with below error,
[
ERROR
] COMPILATION ERROR :
[
INFO
] -------------------------------------------------------------
[
ERROR
] ImageRender.java:[326,42] cannot access org.apache.poi.ooxml.POIXMLDocument
class file for org.apache.poi.ooxml.POIXMLDocument not found
I thought the latest version removed this
org.apache.poi.ooxml.POIXMLDocument so I manually added below dependency to resolve the issue
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.17</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>5.2.2</version>
</dependency>
But even after above
dependency
I get the same compile time error. Is there any problem with
org.apache.poi.ooxml.POIXMLDocument
in latest uber version (6.5.15)
Is anyone facing this similar issue ?
Hello
@Mario248
,
Try with the same version of both dependency
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>5.2.2</version>
</dependency>
A similar thing is discussed here.
https://stackoverflow.com/questions/63384557/issue-with-apache-poi-upgrading-aem-from-6-5-2-6-5-5
Sorry, I forgot to mention I have included both artifactId poi & poi-ooxml but still I am getting the same error. I have included below dependencies in parent 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.2</version>
</dependency>
Added below dependencies in core module's pom.xml
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
</dependency>
Thank you so much for your input. It resolved compilation issue but I am facing issue in junit - Unexpected exception thrown: java.lang.NoClassDefFoundError: Could not initialize class org.apache.poi.xssf.usermodel.XSSFWorkbookType
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();
Any idea why idea why junit class is unable to initialize class org.apache.poi.xssf.usermodel.XSSFWorkbookType?