The error you’re encountering is due to changes in Java module access controls introduced in Java 9 and later versions. Java 17 enforces stricter encapsulation, and HttpsURLConnectionImpl
is part of a package that is not exported to unnamed modules, which includes BeanShell.
To resolve this issue, you can try adding the --add-exports
option to allow reflective access to the required module. This needs to be configured in the JVM arguments for the Tomcat server where IdentityIQ is running.
You can add the following argument to your Tomcat startup script:
--add-exports java.base/sun.net.www.protocol.https=ALL-UNNAMED
This will export the package to all unnamed modules, which should resolve the IllegalAccessException
. If you are using catalina.sh
or catalina.bat
, modify the CATALINA_OPTS
or JAVA_OPTS
environment variable to include this option.
For example, you might add it like this in catalina.sh
:
CATALINA_OPTS="$CATALINA_OPTS --add-exports java.base/sun.net.www.protocol.https=ALL-UNNAMED"
Or in catalina.bat
:
set "CATALINA_OPTS=%CATALINA_OPTS% --add-exports java.base/sun.net.www.protocol.https=ALL-UNNAMED"
Restart Tomcat after making this change, and it should resolve the issue with IllegalAccessException
.