0

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)?

asked Nov 20, 2025 at 16:40

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.