NullPointerException when starting RH-SSO cluster

Solution Verified - Updated -

Issue

  • Unable to start RH-SSO cluster due to following exception:

        DEBUG [org.keycloak.models.sessions.infinispan.initializer.InfinispanCacheInitializer] (ServerService Thread Pool -- 71) Start loading with loader: 'OfflinePersistentUserSessionLoader [ sessionsPerSegment: 64 ]', ctx: 'OfflinePersistentLoaderContext [  sessionsTotal: 21, sessionsPerSegment: 64, segmentsCount: 1 ]' , state: finished segments count: 0, non-finished segments count: 1
        DEBUG [org.keycloak.models.sessions.infinispan.initializer.InfinispanCacheInitializer] (ServerService Thread Pool -- 71) Starting next iteration with 8 workers
        DEBUG [org.keycloak.transaction.JtaTransactionWrapper] (pool-18-thread-1) new JtaTransactionWrapper
        DEBUG [org.keycloak.transaction.JtaTransactionWrapper] (pool-18-thread-1) was existing? false
        DEBUG [org.keycloak.transaction.JtaTransactionWrapper] (pool-18-thread-1) JtaTransactionWrapper rollback
        DEBUG [org.keycloak.transaction.JtaTransactionWrapper] (pool-18-thread-1) JtaTransactionWrapper end
        ERROR [org.keycloak.models.sessions.infinispan.initializer.InfinispanCacheInitializer] (ServerService Thread Pool -- 71) ExecutionException when computed future. Errors: 1: java.util.concurrent.ExecutionException: java.lang.NullPointerException
        at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
        at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1915)
        at org.infinispan.distexec.DefaultExecutorService$DistributedTaskPart.getResult(DefaultExecutorService.java:895)
        at org.infinispan.distexec.DefaultExecutorService$DistributedTaskPart.innerGet(DefaultExecutorService.java:869)
        at org.infinispan.distexec.DefaultExecutorService$DistributedTaskPart.get(DefaultExecutorService.java:850)
        at org.keycloak.models.sessions.infinispan.initializer.InfinispanCacheInitializer.startLoadingImpl(InfinispanCacheInitializer.java:164)
        at org.keycloak.models.sessions.infinispan.initializer.InfinispanCacheInitializer.startLoading(InfinispanCacheInitializer.java:108)
        at org.keycloak.models.sessions.infinispan.initializer.DBLockBasedCacheInitializer.startLoading(DBLockBasedCacheInitializer.java:75)
        at org.keycloak.models.sessions.infinispan.initializer.CacheInitializer.loadSessions(CacheInitializer.java:41)
        at org.keycloak.models.sessions.infinispan.InfinispanUserSessionProviderFactory$2.run(InfinispanUserSessionProviderFactory.java:186)
        at org.keycloak.models.utils.KeycloakModelUtils.runJobInTransaction(KeycloakModelUtils.java:227)
        at org.keycloak.models.sessions.infinispan.InfinispanUserSessionProviderFactory.loadPersistentSessions(InfinispanUserSessionProviderFactory.java:172)
        at org.keycloak.models.sessions.infinispan.InfinispanUserSessionProviderFactory$1.lambda$onEvent$0(InfinispanUserSessionProviderFactory.java:126)
        at org.keycloak.models.utils.KeycloakModelUtils.runJobInTransaction(KeycloakModelUtils.java:227)
    ....
    Caused by: java.lang.NullPointerException
        at org.keycloak.models.jpa.session.JpaUserSessionPersisterProvider.toAdapter(JpaUserSessionPersisterProvider.java:319)
        at org.keycloak.models.jpa.session.JpaUserSessionPersisterProvider.loadUserSessions(JpaUserSessionPersisterProvider.java:278)
        at org.keycloak.models.sessions.infinispan.initializer.OfflinePersistentUserSessionLoader.loadSessions(OfflinePersistentUserSessionLoader.java:102)
        at org.keycloak.models.sessions.infinispan.initializer.OfflinePersistentUserSessionLoader.loadSessions(OfflinePersistentUserSessionLoader.java:36)
        at org.keycloak.models.sessions.infinispan.initializer.SessionInitializerWorker$1.run(SessionInitializerWorker.java:73)
        at org.keycloak.models.utils.KeycloakModelUtils.runJobInTransaction(KeycloakModelUtils.java:227)
        at org.keycloak.models.sessions.infinispan.initializer.SessionInitializerWorker.call(SessionInitializerWorker.java:69)
        at org.keycloak.models.sessions.infinispan.initializer.SessionInitializerWorker.call(SessionInitializerWorker.java:34)
            at org.infinispan.commands.read.DistributedExecuteCommand.invokeAsync(DistributedExecuteCommand.java:99)
        at org.infinispan.distexec.DefaultExecutorService$LocalDistributedTaskPart.lambda$execute$1(DefaultExecutorService.java:1059)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
    

Environment

  • Red Hat Single Sign-On (RH-SSO)
    • 7.4.4

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