Symptom
After upgrading to the JDK 21 Commerce Suite (2211-jdk21.5), executing custom unit tests with the Ant unittests command fails due to an out-of-memory error. This issue occurs specifically when running tests on an AWS EC2 instance but does not appear in local environments or with the previous JDK 17-compatible suite. Below are error messages that may appear in the console during test execution:
| [yunitlauncher] Exception in thread "main" java.lang.OutOfMemoryError: Java heap space [yunitlauncher] java.lang.OutOfMemoryError: Java heap space [yunitlauncher] *** java.lang.instrument ASSERTION FAILED ***: "!errorOutstanding" with message can't create name string at ./src/java.instrument/share/native/libinstrument/JPLISAgent.c line: 838 [yunitlauncher] Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "ShutdownHookThread" [yunitlauncher] Forked test(s) failed with an exception |
Read more...
Environment
SAP Commerce Cloud
Product
Keywords
jdk21, ant unittests, out of memory, java heap space, AWS EC2 instance, JUnit 5, test execution, setantenv.sh, hybris, ccv2 , KBA , CEC-SCC-PLA-PL , Platform , Problem
About this page
This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).Search for additional results
Visit SAP Support Portal's SAP Notes and KBA Search.
SAP Knowledge Base Article - Preview