I am trying to run an Ant build ( ant clean all ) for my SAP Commerce Cloud (Hybris) project on a local macOS environment. The build fails immediately with a java.lang.IllegalAccessError related to the xmltask library attempting to access internal JDK classes.
OS: macOS 26 (Tahoe)
Java Version: Java 17
The Error: Here is the full stack trace I am receiving:
BUILD FAILED
/Users/shrikanth/Documents/Vijay/CCv2/hybris/bin/platform/build.xml:100: The following error occurred while executing this line:
.../hybris/bin/platform/resources/ant/modulegen.xml:351: The following error occurred while executing this line:
.../hybris/bin/platform/resources/ant/modulegen.xml:357: The following error occurred while executing this line:
.../hybris/bin/platform/resources/ant/modulegen.xml:271: java.lang.IllegalAccessError: class com.oopsconsultancy.xmltask.jdk15.XPathAnalyser15 (in unnamed module @0x52caa9d8) cannot access class com.sun.org.apache.xpath.internal.objects.XNodeSet (in module java.xml) because module java.xml does not export com.sun.org.apache.xpath.internal.objects to unnamed module @0x52caa9d8
at com.oopsconsultancy.xmltask.jdk15.XPathAnalyser15.analyse(XPathAnalyser15.java:29)
at com.oopsconsultancy.xmltask.XmlReplace.apply(XmlReplace.java:72)
at com.oopsconsultancy.xmltask.XmlReplacement.apply(XmlReplacement.java:61)
at com.oopsconsultancy.xmltask.ant.XmlTask.processDoc(XmlTask.java:692)
at com.oopsconsultancy.xmltask.ant.XmlTask.execute(XmlTask.java:661)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:299)
at jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
at org.apache.tools.ant.Task.perform(Task.java:350)
at java.base/java.util.Vector.forEach(Vector.java:1365)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:67)
at net.sf.antcontrib.logic.IfTask.execute(IfTask.java:197)
at jdk.internal.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
I have already attempted the fixes mentioned in top search results—specifically the ones linked below—but nothing works: java.lang.IllegalAccessError: cannot access class because module does not export to unnamed module
https://community.sap.com/t5/crm-and-cx-q-a/xpathanalyser15-error-during-build/qaq-p/12688941
Has anyone else faced this blocking issue specifically on macOS 26 (Tahoe)?