[SOLVED] java.lang.IllegalAccessError while ant build in SAP Hybris/Commerce version 2205

Question

This Content is from Stack Overflow. Question asked by quickshiftin

Referencing this thread, but version 2205, the recommendations do not work. The error I face when running ./install.sh -r cx-for-spa per the instructions:

> Task :recipes:cx-for-spa:createStoreFrontExt FAILED
Buildfile: /usr/src/myapp/sap-commerce/hybris/bin/platform/build.xml

BUILD FAILED
/usr/src/myapp/sap-commerce/hybris/bin/platform/build.xml:9: The following error occurred while executing this line:
/usr/src/myapp/sap-commerce/hybris/bin/platform/resources/ant/antmacros.xml:37: The following error occurred while executing this line:
/usr/src/myapp/sap-commerce/hybris/bin/platform/resources/ant/mavenTasks.xml:201: java.lang.IllegalAccessError: class com.oopsconsultancy.xmltask.jdk15.XPathAnalyser15 (in unnamed module @0x2805c96b) cannot access class com.sun.org.apache.xpath.internal.XPathAPI (in module java.xml) because module java.xml does not export com.sun.org.apache.xpath.internal to unnamed module @0x2805c96b

What I’ve tried:

According to the documentation SAP Machine should be the way to go. I’m running on Ubuntu 22.04 inside a Docker container. Any help appreciated!

Solution

You need to use SAP Machine 11.0 as JDK for version 2105. Full system requirements by versions areĀ here.

Answered by mkysoft


This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 4.0.

people found this article helpful. What about you?