I am trying to update AEM SDK version from 2021.6.5540.20210615T210737Z-210527 to 2023.4.11835.20230414T234523Z-230200. The build is working fine in local (local java 11.0.13 2021-10-19 LTS)
08:57:35,922 [main] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project aem-project.core: Compilation failure
08:57:35,922 [main] [ERROR] /build_root/build/etisalat-p42155/core/src/main/java/com/project/core/services/impl/GoogleMapsServiceImpl.java:[5,41] cannot access org.apache.jackrabbit.oak.commons.PropertiesUtil
08:57:35,923 [main] [ERROR] bad class file: /root/.m2/repository/com/adobe/aem/aem-sdk-api/2023.4.11835.20230414T234523Z-230200/aem-sdk-api-2023.4.11835.20230414T234523Z-230200.jar(org/apache/jackrabbit/oak/commons/PropertiesUtil.class)
08:57:35,924 [main] [ERROR] class file has wrong version 55.0, should be 52.0
08:57:35,925 [main] [ERROR] Please remove or make sure it appears in the correct subdirectory of the classpath.
After go through some experinceleaguecommunities pages, I can understand that cloudmanager is using java 8 to compile the code. So I am getting this error. Also all are suggesting that to upgrade the cloud manger java version to 11.
1) Will this version 2023.4.11835.20230414T234523Z-230200 support backward compatibility to java 8
2) Is there anyway to fix this issue without upgrading to java 11.
Please advise.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
@Kamaraj_AEM Its a hard dependency, upgrading to Java 11 will resolve you issue.
Maven Compiler Plugin version 3.8.0 is compatible with Java 11. However, it's always recommended to use the latest version of the Maven Compiler Plugin to ensure compatibility with newer Java versions and to benefit from bug fixes and enhancements.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<!-- Maven Compiler Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
This is my config in pom.xml
For local build, I am using maven 3.8.6. From the pipeline log, I can see cloud manager is using maven 3.8.1.
08:57:35,922 [main] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project.
Do I need to add version property in the plugin config?
@Kamaraj_AEM Its a hard dependency, upgrading to Java 11 will resolve you issue.
Hi @Kamaraj_AEM
I think you should to Adobe CSE to check the version on cloud, It must be 11
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies