Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.reflect.InaccessibleObjectException: Unable to make sun.security.ec.ECPublicKeyImpl(byte[]) throws java.security.InvalidKeyException accessible: module jdk.crypto.ec does not "opens sun.security.ec" to unnamed module @76552cb [in thread "main"]
unnamed module @76552cb
: Your application is running in the unnamed module, meaning it's not explicitly part of a defined Java module.
The error happens because Java's module system restricts access to certain internal classes.
If you have control over the JVM arguments, you can open the module to allow access. Add the following JVM option when starting the API gateway:
--add-opens jdk.crypto.ec/sun.security.ec=ALL-UNNAMED
To add the above argument, If you are using a VM to access your software GW and you can edit the JVM arguments.
In linux, you can set the JAVA_OPTS
environment variable like this:
export JAVA_OPTS="--add-opens jdk.crypto.ec/sun.security.ec=ALL-UNNAMED"
This setting --add-opens jdk.crypto.ec/sun.security.ec=ALL-UNNAMED should be set in
/opt/SecureSpan/Gateway/runtime/etc/profile.d/ssgruntimedefs.sh
example :
if the ssgruntimedefs.sh has currently the following line :
default_java_opts="$default_java_opts --add-exports java.xml.crypto/com.sun.org.apache.xml.internal.security=ALL-UNNAMED"
then, we need to add a new line below the existing like the following :
default_java_opts="$default_java_opts --add-opens jdk.crypto.ec/sun.security.ec=ALL-UNNAMED"