cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

XPathAnalyser15 error during build

12,354

Hi.

I am upgrading Hybris 2005-> Hybris 2205.

While ant clean all i am getting following error

java.lang.IllegalAccessError: class com.oopsconsultancy.xmltask.jdk15.XPathAnalyser15 (in unnamed module @0xdec3d79) 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 @0xdec3d79

View Entire Topic
adiputera
Active Participant

This happens to me if I don't use ant from the platform (using . ./setantenv.sh if on Linux or setantenv.bat if on windows).

I have global ant installed, and until 2105 that global ant was working fine, but starting from 2205, we have to use ant from within hybris' platform, if not, the exact same error occurs.

Also, make sure your JAVA_HOME is already set to Java 17

0 Kudos

Hi Yusuf,

I can't thank you enough. One small step solved the issue that I have been struggling for days.

Best

Abinash

adiputera
Active Participant
0 Kudos

Hi Abinash,

You're welcome, I'm glad that solve your problem.

0 Kudos

Hi Yusuf,

I tried the above and still seeing the. same issue after building for 20 min in ant clean all. Ant and JDK looks good as well.

adiputera
Active Participant
0 Kudos

Hi sri2387

You're using Java 17 & SAP Commerce 2205 too?

If yes, can you try with SAP Machine 17?

0 Kudos

Hi Yusuf,

Setting ant env in local solves the issue.

But on a remote Jenkins it is not working. I have included setantenv to jenkinsfile like below

dir(env.PLATFORM_HOME) {

sh '. ./setantenv.sh'

sh 'ant customize'

sh 'ant addoninstall -DaddonStorefront.yacceleratorstorefront=sacostorefront -Daddonnames=addons........'

sh 'ant clean all'

}

But still the same error about XPathApi while installing addons.