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.
Solved! Go to Solution.
You need to "upgrade" your java version to 11. try openJDK 11. then recompile with maven
Hope it helps.
You need to "upgrade" your java version to 11. try openJDK 11. then recompile with maven
Hope it helps.
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 !
Hi @Syedjunaid
Great that your issue is solved & thanks for accepting the solution & reporting back.
Best wishes,
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.