12-04-2020 06:55 AM
Hello everyone,
I am trying to build an amp through maven but the problem is Im getting the below error. Did some research, found that I have to downgrade my java's jdk version from 8 to 6. Now the problem is Debian (linux) doesn't support jdk 1.6 or lower than it.
Does anyone know any alternative solution for this problem.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project userreports-platform: Compilation failure [ERROR] /home/junaid/userreports/userreports-platform/src/main/java/com/virtuosoft/userreports/platformsample/DemoComponent.java:[22,43] cannot access org.alfresco.service.cmr.repository.NodeRef [ERROR] bad class file: /home/junaid/.m2/repository/org/alfresco/alfresco-data-model/8.50.1/alfresco-data-model-8.50.1.jar(org/alfresco/service/cmr/repository/NodeRef.class) [ERROR] class file has wrong version 55.0, should be 52.0 [ERROR] Please remove or make sure it appears in the correct subdirectory of the classpath.
Regards,
Syed Junaid Hussain.
12-04-2020 07:57 AM
You need to "upgrade" your java version to 11. try openJDK 11. then recompile with maven
Hope it helps.
12-04-2020 07:57 AM
You need to "upgrade" your java version to 11. try openJDK 11. then recompile with maven
Hope it helps.
12-07-2020 06:23 AM
Dear @abbask01 ,
Thanks for the suggestion, I just removed jdk 8 and installed jdk 11 and then the project was built succesfully and my amp was created. Thanks again !
12-07-2020 12:53 PM
Hi @Syedjunaid
Great that your issue is solved & thanks for accepting the solution & reporting back.
Best wishes,
Explore our Alfresco products with the links below. Use labels to filter content by product module.