Skip to main content
KenWoodward
Participant
Feb 12, 2021 12:30 AM UTC
Answered

AEM Cloud Manager build error bad class file

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 is closed to new replies. Start a new post to keep the conversation going.
KenWoodward
KenWoodwardCorrect answer
Participant
Feb 19, 2021 6:58 PM UTC

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.

7 replies

Participant
Apr 30, 2024 3:17 PM UTC

Is there any update on this issue?

 

Translate
Legend
May 2, 2024 4:19 PM UTC

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

Translate
Bani Verma
Legend
Feb 15, 2021 8:40 AM UTC

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!

Translate
KenWoodward
KenWoodwardAuthorCorrect answer
Participant
Feb 19, 2021 6:58 PM UTC

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.

Translate
Bani Verma
Legend
Feb 22, 2021 10:17 AM UTC

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

Translate
KenWoodward
Participant
Feb 12, 2021 4:00 PM UTC

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.

Translate