Error while upgrading AEM from 6.5.2 to 6.5.5

Mayukh007

12-08-2020

HI,

 

We are planning to upgrade our AEM from 6.5.2 to 6.5.5 through service pack: https://docs.adobe.com/content/help/en/experience-manager-65/release-notes/service-pack/sp-release-n....

While following the instruction, I installed the 6.5.5 package and then updated pom.xml to update uber jar to 6.5.5. I can see those changes in my project.

But when I try to compile and build the project I get below error:

[ERROR] COMPILATION ERROR :

[INFO] -------------------------------------------------------------

[ERROR] /Users/mukmayu/All_Documents/Project_Official/Manulife_CEA/Code_Workspaces/AEMCodeAll/aem-global/core/src/main/java/ca/manulifeglobal/core/util/AssetAccessUtils.java:[99,7] cannot access org.apache.poi.ooxml.POIXMLDocument

  class file for org.apache.poi.ooxml.POIXMLDocument not found

[ERROR] /Users/mukmayu/All_Documents/Project_Official/Manulife_CEA/Code_Workspaces/AEMCodeAll/aem-global/core/src/main/java/ca/manulifeglobal/core/util/AssetAccessUtils.java:[132,19] cannot access org.apache.poi.ooxml.POIXMLDocumentPart

  class file for org.apache.poi.ooxml.POIXMLDocumentPart not found

[ERROR] /Users/mukmayu/All_Documents/Project_Official/Manulife_CEA/Code_Workspaces/AEMCodeAll/aem-global/core/src/main/java/ca/manulifeglobal/core/util/AssetAccessUtils.java:[158,15] cannot find symbol

  symbol:   method write(java.io.ByteArrayOutputStream)

  location: variable workbook of type org.apache.poi.xssf.usermodel.XSSFWorkbook

 

To fix I tried to add dependency for apache poi:

<dependency>

    <groupId>org.apache.poi</groupId>

    <artifactId>poi</artifactId>

    <version>4.1.2</version>

</dependency>

 

But when I do maven update, i dont see any jar getting added in my project and error persists.

Any suggestion...?

Accepted Solutions (1)

Accepted Solutions (1)

SundeepKatepally

12-08-2020

You need to add one more dependency

<dependency>
    <groupId>org.apache.poi</groupId>
    <artifactId>poi-ooxml</artifactId>
    <version>3.9</version>
</dependency>

 

Change the version as expected by your instance

 

org.apache.poi.xssf.usermodel.XSSFWorkbook class is available in the above dependency bundle.

 

Thanks Sundeep, that resolved the issue....but now I am getting another error for it.launcher:

 

[INFO] Installing /Users/mukmayu/All_Documents/Project_Official/Manulife_CEA/Code_Workspaces/AEMCodeAll/aem-global/it.launcher/target/aem-global.it.launcher-0.4.83-SNAPSHOT.jar to /Users/mukmayu/.m2/repository/ca/manulife/dxp/aem-global.it.launcher/0.4.83-SNAPSHOT/aem-global.it.launcher-0.4.83-SNAPSHOT.jar

[INFO] Installing /Users/mukmayu/All_Documents/Project_Official/Manulife_CEA/Code_Workspaces/AEMCodeAll/aem-global/it.launcher/pom.xml to /Users/mukmayu/.m2/repository/ca/manulife/dxp/aem-global.it.launcher/0.4.83-SNAPSHOT/aem-global.it.launcher-0.4.83-SNAPSHOT.pom

[INFO] Installing /Users/mukmayu/All_Documents/Project_Official/Manulife_CEA/Code_Workspaces/AEMCodeAll/aem-global/it.launcher/reports.zip to /Users/mukmayu/.m2/repository/ca/manulife/dxp/aem-global.it.launcher/0.4.83-SNAPSHOT/aem-global.it.launcher-0.4.83-SNAPSHOT.reports.zip

[INFO] ------------------------------------------------------------------------

[INFO] Reactor Summary:

[INFO]

[INFO] Manulife AEM Global - Reactor Project 0.4.83-SNAPSHOT SUCCESS [  0.241 s]

[INFO] Manulife AEM Global Bundle ......................... SUCCESS [ 20.971 s]

[INFO] Manulife AEM Global Apps Package ................... SUCCESS [ 24.754 s]

[INFO] Manulife AEM Global Content Package ................ SUCCESS [  0.305 s]

[INFO] aem-global - Integration Tests Bundles ............. SUCCESS [  1.674 s]

[INFO] aem-global - Integration Tests Launcher 0.4.83-SNAPSHOT FAILURE [  1.092 s]

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 50.248 s

[INFO] Finished at: 2020-08-13T00:09:37-04:00

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.5.2:install (default-install) on project aem-global.it.launcher: Failed to install artifact ca.manulife.dxp:aem-global.it.launcher:reports.zip:0.4.83-SNAPSHOT: /Users/mukmayu/All_Documents/Project_Official/Manulife_CEA/Code_Workspaces/AEMCodeAll/aem-global/it.launcher/reports.zip (No such file or directory) -> [Help 1]

[ERROR]

Answers (1)

Answers (1)

ChitraMadan

MVP

12-08-2020

Hi @Mayukh007 

 

The dependency you are including does not have the class you are trying to compile with it.

<dependency>

    <groupId>org.apache.poi</groupId>

    <artifactId>poi</artifactId>

    <version>4.1.2</version>

</dependency>

 

Screenshot 2020-08-12 at 23.09.48.png

 

Can you please try to add below dependency and tray again

<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>4.1.2</version>
</dependency>

Screenshot 2020-08-12 at 23.12.24.png

Thank you Chitra...that resolved the issue...!!
Now I am getting different error for it.launcher project: [INFO] Installing /Users/mukmayu/All_Documents/Project_Official/Manulife_CEA/Code_Workspaces/AEMCodeAll/aem-global/it.launcher/target/aem-global.it.launcher-0.4.83-SNAPSHOT.jar to /Users/mukmayu/.m2/repository/ca/manulife/dxp/aem-global.it.launcher/0.4.83-SNAPSHOT/aem-global.it.launcher-0.4.83-SNAPSHOT.jar [INFO] Installing /Users/mukmayu/All_Documents/Project_Official/Manulife_CEA/Code_Workspaces/AEMCodeAll/aem-global/it.launcher/pom.xml to /Users/mukmayu/.m2/repository/ca/manulife/dxp/aem-global.it.launcher/0.4.83-SNAPSHOT/aem-global.it.launcher-0.4.83-SNAPSHOT.pom [INFO] Installing /Users/mukmayu/All_Documents/Project_Official/Manulife_CEA/Code_Workspaces/AEMCodeAll/aem-global/it.launcher/reports.zip to /Users/mukmayu/.m2/repository/ca/manulife/dxp/aem-global.it.launcher/0.4.83-SNAPSHOT/aem-global.it.launcher-0.4.83-SNAPSHOT.reports.zip [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] Manulife AEM Global - Reactor Project 0.4.83-SNAPSHOT SUCCESS [ 0.241 s] [INFO] Manulife AEM Global Bundle ......................... SUCCESS [ 20.971 s] [INFO] Manulife AEM Global Apps Package ................... SUCCESS [ 24.754 s] [INFO] Manulife AEM Global Content Package ................ SUCCESS [ 0.305 s] [INFO] aem-global - Integration Tests Bundles ............. SUCCESS [ 1.674 s] [INFO] aem-global - Integration Tests Launcher 0.4.83-SNAPSHOT FAILURE [ 1.092 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 50.248 s [INFO] Finished at: 2020-08-13T00:09:37-04:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.5.2:install (default-install) on project aem-global.it.launcher: Failed to install artifact ca.manulife.dxp:aem-global.it.launcher:reports.zip:0.4.83-SNAPSHOT: /Users/mukmayu/All_Documents/Project_Official/Manulife_CEA/Code_Workspaces/AEMCodeAll/aem-global/it.launcher/reports.zip (No such file or directory) -> [Help 1] [ERROR]

Hi @Mayukh007, Why is this not found. Can you please check in your local?

/Users/mukmayu/All_Documents/Project_Official/Manulife_CEA/Code_Workspaces/AEMCodeAll/aem-global/it.launcher/reports.zip (No such file or directory) -> [Help 1] [ERROR]

HI Chitra, I have fixed it...it was due to a commented line in pom...all is good now..thanks a lot for helping me out.