AEM | Cloud Manager | Java 11 Build issues | Community
Skip to main content
Level 4
March 22, 2021
Solved

AEM | Cloud Manager | Java 11 Build issues

  • March 22, 2021
  • 1 reply
  • 1593 views

Hi Team,

 

Facing issues while building code in Java 11 on Cloud Manager. Followed https://experienceleague.adobe.com/docs/experience-manager-cloud-service/onboarding/getting-access/create-application-project/build-environment-details.html?lang=en#environment-variables 

 

and getting

 

05:04:24,675 [main] [ERROR] Failed to execute goal org.apache.felix:maven-scr-plugin:1.26.4:scr (generate-scr-scrdescriptor) on project : Unable to load compiled class: has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 -> [Help 1]

 

07:59:56,450 [main] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on : Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test failed:  has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 -> [Help 1]

 

Can you please update on same and next steps

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by bilal_ahmad

Hi @nehama , first off you need to get rid of all the SCR annotations and replace them with OSGi R6/R7 annotations. Post that your build will probably not fail. 
Reference : https://helpx.adobe.com/in/experience-manager/kb/cloud-manager-build-on-java11-aem.html 

Thanks,

Bilal.

1 reply

bilal_ahmad
bilal_ahmadAccepted solution
Level 5
March 22, 2021

Hi @nehama , first off you need to get rid of all the SCR annotations and replace them with OSGi R6/R7 annotations. Post that your build will probably not fail. 
Reference : https://helpx.adobe.com/in/experience-manager/kb/cloud-manager-build-on-java11-aem.html 

Thanks,

Bilal.

NehaMaAuthor
Level 4
March 23, 2021
Hi @bilal_ahmad - What about maven-surefire-plugin error 07:59:56,450 [main] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on : Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test failed: has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 -> [Help 1] Kindly update on same as well