[keycloak-user] Server fails to start with java.lang.StackOverflowError on infinispan.initializer.InfinispanUserSessionInitializer]

Bruno Oliveira bruno at abstractj.org
Thu Apr 7 17:20:35 EDT 2016


It seems related to https://issues.jboss.org/browse/KEYCLOAK-2431. Do the
same happens with 1.9.1.Final?

On Thu, Apr 7, 2016 at 6:26 AM Gerard Laissard <glaissard at axway.com> wrote:

> Team,
>
>
>
> Keycloak server 1.9.0 fails to start.
>
> Yesterday, I did try to play with client/role : Scope Param Required
> without any success.
>
> I got server java.lang.StackOverflowError.
>
> I stopped the server
>
> Today when I start server, I have :
>
> 10:51:50,948 ERROR
> [org.keycloak.models.sessions.infinispan.initializer.InfinispanUserSessionInitializer]
> (ServerService Thread Pool -- 52) ExecutionException when computed future.
> Errors: 1: java.util.concurrent.ExecutionException:
> java.lang.StackOverflowError
>
>                at
> java.util.concurrent.FutureTask.report(FutureTask.java:122)
>
>                at java.util.concurrent.FutureTask.get(FutureTask.java:192)
>
>                at
> org.keycloak.models.sessions.infinispan.initializer.InfinispanUserSessionInitializer.startLoading(InfinispanUserSessionInitializer.java:197)
>
>                at
> org.keycloak.models.sessions.infinispan.initializer.InfinispanUserSessionInitializer.loadPersistentSessions(InfinispanUserSessionInitializer.java:88)
>
>                at
> org.keycloak.models.sessions.infinispan.InfinispanUserSessionProviderFactory$2.run(InfinispanUserSessionProviderFactory.java:91)
>
>                at
> org.keycloak.models.utils.KeycloakModelUtils.runJobInTransaction(KeycloakModelUtils.java:280)
>
>                at
> org.keycloak.models.sessions.infinispan.InfinispanUserSessionProviderFactory.loadPersistentSessions(InfinispanUserSessionProviderFactory.java:82)
>
>                at
> org.keycloak.models.sessions.infinispan.InfinispanUserSessionProviderFactory$1.onEvent(InfinispanUserSessionProviderFactory.java:71)
>
>                at
> org.keycloak.services.DefaultKeycloakSessionFactory.publish(DefaultKeycloakSessionFactory.java:63)
>
>                at
> org.keycloak.services.resources.KeycloakApplication.<init>(KeycloakApplication.java:141)
>
>                at
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>
>                at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>
>                at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>
>                at
> java.lang.reflect.Constructor.newInstance(Constructor.java:423)
>
>                at
> org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:150)
>
>                at
> org.jboss.resteasy.spi.ResteasyProviderFactory.createProviderInstance(ResteasyProviderFactory.java:2209)
>
>                at
> org.jboss.resteasy.spi.ResteasyDeployment.createApplication(ResteasyDeployment.java:299)
>
>                at
> org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:240)
>
>                at
> org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:113)
>
>                at
> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36)
>
>                at
> io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117)
>
>                at
> org.wildfly.extension.undertow.security.RunAsLifecycleInterceptor.init(RunAsLifecycleInterceptor.java:78)
>
>                at
> io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:103)
>
>                at
> io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:231)
>
>                at
> io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:132)
>
>                at
> io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:526)
>
>                at
> org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:101)
>
>                at
> org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)
>
>                at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>
>                at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>
>                at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>
>                at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>
>                at java.lang.Thread.run(Thread.java:745)
>
>                at org.jboss.threads.JBossThread.run(JBossThread.java:320)
>
> Caused by: java.lang.StackOverflowError
>
>                at
> org.jboss.jca.adapters.jdbc.WrappedConnection.checkException(WrappedConnection.java:1958)
>
>                at
> org.jboss.jca.adapters.jdbc.WrappedStatement.checkException(WrappedStatement.java:1446)
>
>                at
> org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:509)
>
>                at
> org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:70)
>
>                at
> org.hibernate.loader.Loader.getResultSet(Loader.java:2116)
>
>                at
> org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1899)
>
>                at
> org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1875)
>
>                at org.hibernate.loader.Loader.doQuery(Loader.java:919)
>
>                at
> org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:336)
>
>                at org.hibernate.loader.Loader.doList(Loader.java:2611)
>
>                at org.hibernate.loader.Loader.doList(Loader.java:2594)
>
>                at
> org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2423)
>
>                at org.hibernate.loader.Loader.list(Loader.java:2418)
>
>                at
> org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:501)
>
>                at
> org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:371)
>
>                at
> org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:216)
>
>                at
> org.hibernate.internal.SessionImpl.list(SessionImpl.java:1326)
>
>                at org.hibernate.internal.QueryImpl.list(QueryImpl.java:87)
>
>                at
> org.hibernate.jpa.internal.QueryImpl.list(QueryImpl.java:606)
>
>                at
> org.hibernate.jpa.internal.QueryImpl.getResultList(QueryImpl.java:483)
>
>                at
> org.keycloak.models.jpa.ClientAdapter.getScopeMappings(ClientAdapter.java:246)
>
>                at
> org.keycloak.models.cache.entities.CachedClient.<init>(CachedClient.java:98)
>
>                at
> org.keycloak.models.cache.infinispan.locking.entities.RevisionedCachedClient.<init>(RevisionedCachedClient.java:18)
>
>                at
> org.keycloak.models.cache.infinispan.locking.LockingCacheRealmProvider.getClientById(LockingCacheRealmProvider.java:456)
>
>                at
> org.keycloak.models.cache.infinispan.RealmAdapter.getClientById(RealmAdapter.java:631)
>
>                at
> org.keycloak.models.jpa.RoleAdapter.getContainer(RoleAdapter.java:135)
>
>                at
> org.keycloak.models.cache.infinispan.locking.LockingCacheRealmProvider.getRoleById(LockingCacheRealmProvider.java:397)
>
>                at
> org.keycloak.models.cache.infinispan.RealmAdapter.getRoleById(RealmAdapter.java:543)
>
>                at
> org.keycloak.models.jpa.ClientAdapter.getScopeMappings(ClientAdapter.java:249)
>
>                at
> org.keycloak.models.cache.entities.CachedClient.<init>(CachedClient.java:98)
>
>                at
> org.keycloak.models.cache.infinispan.locking.entities.RevisionedCachedClient.<init>(RevisionedCachedClient.java:18)
>
>                at
> org.keycloak.models.cache.infinispan.locking.LockingCacheRealmProvider.getClientById(LockingCacheRealmProvider.java:456)
>
>                at
> org.keycloak.models.cache.infinispan.RealmAdapter.getClientById(RealmAdapter.java:631)
>
>                at
> org.keycloak.models.jpa.RoleAdapter.getContainer(RoleAdapter.java:135)
>
>                at
> org.keycloak.models.cache.infinispan.locking.LockingCacheRealmProvider.getRoleById(LockingCacheRealmProvider.java:397)
>
>                at
> org.keycloak.models.cache.infinispan.RealmAdapter.getRoleById(RealmAdapter.java:543)
>
>                at
> org.keycloak.models.jpa.ClientAdapter.getScopeMappings(ClientAdapter.java:249)
>
>                at
> org.keycloak.models.cache.entities.CachedClient.<init>(CachedClient.java:98)
>
>                at
> org.keycloak.models.cache.infinispan.locking.entities.RevisionedCachedClient.<init>(RevisionedCachedClient.java:18)
>
>                at
> org.keycloak.models.cache.infinispan.locking.LockingCacheRealmProvider.getClientById(LockingCacheRealmProvider.java:456)
>
>                at
> org.keycloak.models.cache.infinispan.RealmAdapter.getClientById(RealmAdapter.java:631)
>
>                at
> org.keycloak.models.jpa.RoleAdapter.getContainer(RoleAdapter.java:135)
>
>                at
> org.keycloak.models.cache.infinispan.locking.LockingCacheRealmProvider.getRoleById(LockingCacheRealmProvider.java:397)
>
>                at
> org.keycloak.models.cache.infinispan.RealmAdapter.getRoleById(RealmAdapter.java:543)
>
>                at
> org.keycloak.models.jpa.ClientAdapter.getScopeMappings(ClientAdapter.java:249)
>
>                at
> org.keycloak.models.cache.entities.CachedClient.<init>(CachedClient.java:98)
>
>                at
> org.keycloak.models.cache.infinispan.locking.entities.RevisionedCachedClient.<init>(RevisionedCachedClient.java:18)
>
>                at
> org.keycloak.models.cache.infinispan.locking.LockingCacheRealmProvider.getClientById(LockingCacheRealmProvider.java:456)
>
>                at
> org.keycloak.models.cache.infinispan.RealmAdapter.getClientById(RealmAdapter.java:631)
>
>                at
> org.keycloak.models.jpa.RoleAdapter.getContainer(RoleAdapter.java:135)
>
>                at
> org.keycloak.models.cache.infinispan.locking.LockingCacheRealmProvider.getRoleById(LockingCacheRealmProvider.java:397)
>
>                at
> org.keycloak.models.cache.infinispan.RealmAdapter.getRoleById(RealmAdapter.java:543)
>
>                at
> org.keycloak.models.jpa.ClientAdapter.getScopeMappings(ClientAdapter.java:249)
>
>                at
> org.keycloak.models.cache.entities.CachedClient.<init>(CachedClient.java:98)
>
>>
>
>
> What should I do ?
>
> Thanks
>
> Gerard
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20160407/b76cfbf2/attachment-0001.html 


More information about the keycloak-user mailing list