Expand my Community achievements bar.

SOLVED

Cloud manager java version issue

Avatar

Level 4

Hi

I am facing a java version issue in cloud manager build and log says

workflow/NotifyReferencesProcess.java:[18,33] cannot access org.apache.jackrabbit.api.JackrabbitSession
06:52:13,524 [main] [ERROR]   bad class file: /root/.m2/repository/com/adobe/aem/aem-sdk-api/2023.6.12255.20230608T053118Z-230400/aem-sdk-api-2023.6.12255.20230608T053118Z-230400.jar
(org/apache/jackrabbit/api/JackrabbitSession.class)
06:52:13,525 [main] [ERROR]     class file has wrong version 55.0, should be 52.0
06:52:13,525 [main] [ERROR]     Please remove or make sure it appears in the correct subdirectory of the classpath.

I tried few thing but no luck

  • forced cm java version to 11 
  • change jdk to 11
  • maven-enforcer- plugin  change require version to java 11

If anyone have encountered the same, please let me know how to fix it.

(i am migrating from 6.5 to AEMaaCS)

@kautuk_sahni 

 

1 Accepted Solution

Avatar

Correct answer by
Level 4

solution that worked for me

Maven Toolchains
The Maven Toolchains plugin allows projects to select a specific JDK (or toolchain) to be used in the context of toolchains-aware Maven plugins. This is done in the project’s pom.xml file by specifying a vendor and version value. A sample section in the pom.xml file is:

        <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>
CopyToggle Text Wrapping
This will cause all toolchains-aware Maven plugins to use the Oracle JDK, version 11.

View solution in original post

5 Replies

Avatar

Community Advisor

Hi @Amit-Tiwari 

Version 55.0 points to java 11 and 52 to java8 . Looks like here they are expecting class compiled on java8 but getting one with java11.

 

I saw one similar post where they talk about an open ticket with adobe little over an year old. Please check the below link might of help here .Issue is faced while building with cloud manager 

https://community.adobe.com/t5/enterprise-teams-discussions/aem-cloud-manager-build-error-bad-class-...

 

 

Avatar

Level 3

Checking Maven version and pointing maven to Java 11 resolved this issue.

Avatar

Correct answer by
Level 4

solution that worked for me

Maven Toolchains
The Maven Toolchains plugin allows projects to select a specific JDK (or toolchain) to be used in the context of toolchains-aware Maven plugins. This is done in the project’s pom.xml file by specifying a vendor and version value. A sample section in the pom.xml file is:

        <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>
CopyToggle Text Wrapping
This will cause all toolchains-aware Maven plugins to use the Oracle JDK, version 11.