Skip to main content
KenWoodward
New Participant
February 12, 2021
Answered

AEM Cloud Manager build error bad class file

  • February 12, 2021
  • 3 replies
  • 2655 views

I get the following erroe when building via cloud manager.

 

23:53:20,440 [main] [ERROR] COMPILATION ERROR : 
23:53:20,441 [main] [INFO] -------------------------------------------------------------
23:53:20,442 [main] [ERROR] /build_root/build/clientnameservicesincprogram-p28904/ui.apps/target/generated-sources/htl/org/apache/sling/scripting/sightly/apps/clientname/components/form/container/container_html.java:[45,88] cannot access com.day.cq.wcm.foundation.model.responsivegrid.ResponsiveGrid
  bad class file: /root/.m2/repository/com/adobe/aem/aem-sdk-api/2021.1.4738.20210107T143101Z-201217/aem-sdk-api-2021.1.4738.20210107T143101Z-201217.jar(com/day/cq/wcm/foundation/model/responsivegrid/ResponsiveGrid.class)
    class file has wrong version 55.0, should be 52.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.

This is a very basic AEM implementation.  In this case, we've overlayed just the container.html file of the Core Form Container component but have not modified the call to the ResponsiveGrid.  This build fine locally. The AEM API SDK version matches what is being used on our AEMaaCS instance. 

How do we get the correct class file version?  

 

Here is the HTML from container.html file

<form data-sly-use.container="com.adobe.cq.wcm.core.components.models.form.Container"
  data-sly-use.grid="com.day.cq.wcm.foundation.model.responsivegrid.ResponsiveGrid"
  method="${container.method}" action="${container.action}" id="${container.id}" name="${container.name}"
  enctype="${container.enctype}"
  class="cmp-form ${grid.cssClass}">
This topic has been closed for replies.
Correct answer KenWoodward

I reached out to Adobe Support regarding this issue.   This is a known bug (CQ-4315753).  They plan to address it AEM as a Cloud Service soon (no confirmed date).

 

Cloud Manager, by default, compiles via Java8.  However, some classes in the aem-sdk-api are compiled with Java11.  This is why this error manifests itself.  Hope this helps someone.

3 replies

New Participant
April 30, 2024

Is there any update on this issue?

 

Brainiac
May 2, 2024

Hi @WebWorld28

This is the Enterprise and Teams Community, AEM has a separate Community. You will need to post your question here:

https://adobe.ly/4bl9Gx7


^CS

Bani Verma
Community Manager
Community Manager
February 15, 2021

Hi there,

Please post your query in the following community: https://forums.adobe.com/community/experience-cloud/marketing-cloud/experience-manager.

Experts here will be able to assist you better. Thanks!

KenWoodward
KenWoodwardAuthorCorrect answer
New Participant
February 19, 2021

I reached out to Adobe Support regarding this issue.   This is a known bug (CQ-4315753).  They plan to address it AEM as a Cloud Service soon (no confirmed date).

 

Cloud Manager, by default, compiles via Java8.  However, some classes in the aem-sdk-api are compiled with Java11.  This is why this error manifests itself.  Hope this helps someone.

Bani Verma
Community Manager
Community Manager
February 22, 2021

Thank you for sharing this, it will definitely help other members facing this issue. 🙂 

KenWoodward
New Participant
February 12, 2021

This seems to be an issue with the compiler.  Version 52.0 is Java 8 and version 55.0 is Java 11.  I thought Java 11 is expected for AEMaaCS.