A 'java.lang.NullPointerException' error is returned when creating a KeycloakRealm using authenticationFlows with the Red Hat Single Sign-On (RH SSO) Operator

Solution Verified - Updated -

Issue

A java.lang.NullPointerException error is returned when the RH SSO Operator tries to reconcile our KeyCloakRealm CR with authenticationFlows:

20:55:33,598 ERROR [org.keycloak.services.error.KeycloakErrorHandler] (default task-1) Uncaught server error: java.lang.NullPointerException
    at org.keycloak.keycloak-server-spi-private@18.0.8.redhat-00001//org.keycloak.models.utils.KeycloakModelUtils.deepFindAuthenticationExecutions(KeycloakModelUtils.java:482)
    at org.keycloak.keycloak-server-spi-private@18.0.8.redhat-00001//org.keycloak.models.utils.DefaultAuthenticationFlows.firstBrokerLoginFlow(DefaultAuthenticationFlows.java:605)
    at org.keycloak.keycloak-server-spi-private@18.0.8.redhat-00001//org.keycloak.models.utils.RepresentationToModel.importAuthenticationFlows(RepresentationToModel.java:812)

  ...

    at org.jboss.threads@2.4.0.Final-redhat-00001//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
    at org.jboss.xnio@3.8.9.Final-redhat-00001//org.xnio.XnioWorker$WorkerThreadFactory$1$1.run(XnioWorker.java:1282)
    at java.base/java.lang.Thread.run(Thread.java:829)

Environment

  • Red Hat Single Sign-On (RH SSO)
    • 7.X (Operator)
  • Red Hat OpenShift Container Platform (OCP)
    • 4.X

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content