I'm attempting to use Keycloak 5.0.0 and OpenJDK 11.0.2 on RHEL 7.6, but encountering
an error executing the bin/add-user-keycloak.sh script:
[root@keycloaktest bin]# ./add-user-keycloak.sh -u admin
org.jboss.modules.ModuleNotFoundException: java.se
at org.jboss.modules.Module.addPaths(Module.java:1266)
at org.jboss.modules.Module.link(Module.java:1622)
at org.jboss.modules.Module.relinkIfNecessary(Module.java:1650)
at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:296)
at org.jboss.modules.Main.main(Main.java:437)
[root@keycloaktest bin]# export JAVA_OPTS="--add-modules java.se"
[root@keycloaktest bin]# echo $JAVA_OPTS
--add-modules java.se
[root@keycloaktest bin]# ./add-user-keycloak.sh -u admin
Press ctrl-d (Unix) or ctrl-z (Windows) to exit
Password:
Added 'admin' to
'/opt/wildfly/keycloak-5.0.0/standalone/configuration/keycloak-add-user.json',
restart server to load user
[root@keycloaktest bin]#
I found the workaround here:
https://issues.jboss.org/browse/WFCORE-3962
and here:
https://issues.jboss.org/browse/MODULES-372
Is this simply an oversight with the add-user-keycloak.sh script and will be fixed in a
future release?