I have added to the Default VM Arguments --add-exports
java.base/sun.security.action=ALL-UNNAMED --add-exports
java.base/sun.util.calendar=ALL-UNNAMED
and my app compile and run fine in development. I moved my app to AWS
and it is failing with:
[2026-1-21 18:39:46 UTC] <main> java.lang.IllegalAccessError: class
com.webobjects.foundation.NSTimeZone (in unnamed module @0x6b09fb41)
cannot access class sun.security.action.GetPropertyAction (in module
java.base) because module java.base does not export sun.security.action
to unnamed module @0x6b09fb41
at
com.webobjects.foundation.NSTimeZone.systemTimeZone(NSTimeZone.java:971)
at
com.webobjects.foundation.NSTimeZone.defaultTimeZone(NSTimeZone.java:818)
at
com.webobjects.foundation.NSTimestampFormatter.defaultFormatTimeZone(NSTimestampFormatter.java:734)
at
com.webobjects.appserver.WOStatisticsStore.<clinit>(WOStatisticsStore.java:249)
at
com.webobjects.appserver.WOApplication.<init>(WOApplication.java:853)
Looks like the same issue, so I added to Additional Arguments:
-Duser.name=ec2 --add-exports java.base/sun.security.action=ALL-UNNAMED
--add-exports java.base/sun.util.calendar=ALL-UNNAMED
What am I missing?