• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

AEM Cloud Manager build error bad class file

Community Beginner ,
Feb 11, 2021 Feb 11, 2021

Copy link to clipboard

Copied

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}">
TOPICS
Deploy and package apps , Troubleshooting

Views

1.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Feb 19, 2021 Feb 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.

Votes

Translate

Translate
Community Beginner ,
Feb 12, 2021 Feb 12, 2021

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Feb 15, 2021 Feb 15, 2021

Copy link to clipboard

Copied

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!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 19, 2021 Feb 19, 2021

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Feb 22, 2021 Feb 22, 2021

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 15, 2022 Mar 15, 2022

Copy link to clipboard

Copied

LATEST

And what is the workaround until this is fixed?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines