Cloud Manager Build Error aQute/bnd/osgi/analyzer | Community
Skip to main content
Level 2
December 1, 2024
Solved

Cloud Manager Build Error aQute/bnd/osgi/analyzer

  • December 1, 2024
  • 3 replies
  • 1300 views

Hi,

 

We are in AEM as a cloud service and we see the below error recently when we do the cloud manager build on the core module.

 

"Error injecting: org.apache.felix.bundleplugin.ManifestPlugin
java.lang.UnsupportedClassVersionError: aQute/bnd/osgi/Analyzer has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1 (Native Method)"

 

The cloud manager java version is 1.8 .

 

Any pointers on this would be of great help.

 

Regards,

S

Best answer by MukeshYadav_

Hi, this is just a version mismatch. You might have compiled your code using Java version 17 and cloud manager's JRE is version 8.

49 = Java 5
50 = Java 6
51 = Java 7
52 = Java 8
53 = Java 9
54 = Java 10
55 = Java 11
56 = Java 12
57 = Java 13
58 = Java 14
59 = Java 15
60 = Java 16
61 = Java 17
62 = Java 18
63 = Java 19
64 = Java 20
65 = Java 21

we can made plugin compatible with java 8

https://www.mojohaus.org/exec-maven-plugin/plugin-info.html

Thanks 

3 replies

narendiran_ravi
Level 6
December 1, 2024
MukeshYadav_
Community Advisor
MukeshYadav_Community AdvisorAccepted solution
Community Advisor
December 2, 2024

Hi, this is just a version mismatch. You might have compiled your code using Java version 17 and cloud manager's JRE is version 8.

49 = Java 5
50 = Java 6
51 = Java 7
52 = Java 8
53 = Java 9
54 = Java 10
55 = Java 11
56 = Java 12
57 = Java 13
58 = Java 14
59 = Java 15
60 = Java 16
61 = Java 17
62 = Java 18
63 = Java 19
64 = Java 20
65 = Java 21

we can made plugin compatible with java 8

https://www.mojohaus.org/exec-maven-plugin/plugin-info.html

Thanks 

Asutosh_Jena_
Community Advisor
Community Advisor
December 2, 2024

Hi @srinivasanpa1 

Please upgrade your project and cloud manager pipeline to JDK 11.

Please update the maven compiler plugin to JDK 11 from 1.8 and include the maven tool chain plugin in the main pom.xml

Link for Reference: https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/using-cloud-manager/create-application-project/build-environment-details#using-java-support

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>11</source>
<target>11</target>
</configuration>
</plugin>




<profile>
<id>cm-java-11</id>
<activation>
<property>
<name>env.CM_BUILD</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-toolchains-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<goals>
<goal>toolchain</goal>
</goals>
</execution>
</executions>
<configuration>
<toolchains>
<jdk>
<version>11</version>
<vendor>oracle</vendor>
</jdk>
</toolchains>
</configuration>
</plugin>
</plugins>
</build>
</profile>