PS: we did have another issue with 1.9.0.Final in that Keycloak failed to upgrade its database model from 1.9.0.RC1. We solved that simply by starting again with an empty database, as we import our realm every time anyway. I guess the database upgrade path from a release candidate version is not something that is supported in any case?


08:41:42,161 INFO  [org.keycloak.services] (ServerService Thread Pool -- 46) KC-SERVICES0001: Loading config from /opt/jboss/keycloak/standalone/configuration/keycloak-server.json
08:41:45,659 ERROR [org.keycloak.services] (ServerService Thread Pool -- 46) KC-SERVICES0002: Failed to migrate datamodel: java.lang.RuntimeException: Failed to update database
at org.keycloak.connections.jpa.updater.liquibase.LiquibaseJpaUpdaterProvider.update(LiquibaseJpaUpdaterProvider.java:91)
at org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory.lazyInit(DefaultJpaConnectionProviderFactory.java:170)
at org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory.create(DefaultJpaConnectionProviderFactory.java:59)
at org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory.create(DefaultJpaConnectionProviderFactory.java:47)
at org.keycloak.services.DefaultKeycloakSession.getProvider(DefaultKeycloakSession.java:101)
at org.keycloak.models.jpa.JpaRealmProviderFactory.create(JpaRealmProviderFactory.java:51)
at org.keycloak.models.jpa.JpaRealmProviderFactory.create(JpaRealmProviderFactory.java:33)
at org.keycloak.services.DefaultKeycloakSession.getProvider(DefaultKeycloakSession.java:101)
at org.keycloak.models.cache.infinispan.locking.LockingCacheRealmProvider.getDelegate(LockingCacheRealmProvider.java:104)
at org.keycloak.models.cache.infinispan.locking.LockingCacheRealmProvider.getMigrationModel(LockingCacheRealmProvider.java:97)
at org.keycloak.migration.MigrationModelManager.migrate(MigrationModelManager.java:39)
at org.keycloak.services.resources.KeycloakApplication.migrateModel(KeycloakApplication.java:152)
at org.keycloak.services.resources.KeycloakApplication.<init>(KeycloakApplication.java:94)
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:422)
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: liquibase.exception.ValidationFailedException: Validation Failed:
     1 change sets check sum
          META-INF/jpa-changelog-1.9.0.xml::1.9.0::mposolda@redhat.com is now: 7:ed2dc7f799d19ac452cbcda56c929e47

at liquibase.changelog.DatabaseChangeLog.validate(DatabaseChangeLog.java:206)
at liquibase.Liquibase.listUnrunChangeSets(Liquibase.java:1139)
at liquibase.Liquibase.listUnrunChangeSets(Liquibase.java:1126)
at liquibase.Liquibase.listUnrunChangeSets(Liquibase.java:1122)
at org.keycloak.connections.jpa.updater.liquibase.LiquibaseJpaUpdaterProvider.update(LiquibaseJpaUpdaterProvider.java:67)
... 36 more


On 25 Feb 2016, at 09:32, Edgar Vonk - Info.nl <Edgar@info.nl> wrote:

Thanks Bill! Yes, the issue was indeed our version of the keycloak-server.json.

On 24 Feb 2016, at 20:46, Bill Burke <bburke@redhat.com> wrote:

Please check the distributions keycloak-server.json, it is changed.  standalone.xml has also changed to add an additional cache.

On 2/24/2016 1:46 PM, Stian Thorgersen wrote:
Well, https://github.com/keycloak/keycloak/blob/1.9.0.Final/model/infinispan/src/main/java/org/keycloak/models/cache/infinispan/InfinispanCacheUserProviderFactory.java#L58 would be a start.

My guess is that session.getProvider(InfinispanConnectionProvider.class) is returning null for some reason. When you say you've done customizations you've not described what you've done.

On 24 February 2016 at 17:59, Edgar Vonk - Info.nl <Edgar@info.nl> wrote:
hi,

Starting from 1.9.0.Final (it was working ok in 1.9.0.RC1) our Keycloak Docker image no longer starts up. We get the following exception. We have made a number of customisations so I am guessing the issue is somewhere there. Maybe someone already has an idea where to look from this stack trace? We based our Docker image on https://hub.docker.com/r/jboss/keycloak/ but customised it quite a bit.

cheers

Edgar

16:49:50,851 INFO  [org.keycloak.services] (ServerService Thread Pool -- 46) KC-SERVICES0050: Initializing master realm
16:49:52,621 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 46) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./auth: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./auth: java.lang.RuntimeException: RESTEASY003325: Failed to construct public org.keycloak.services.resources.KeycloakApplication(javax.servlet.ServletContext,org.jboss.resteasy.core.Dispatcher)
        at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:85)
        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.RuntimeException: RESTEASY003325: Failed to construct public org.keycloak.services.resources.KeycloakApplication(javax.servlet.ServletContext,org.jboss.resteasy.core.Dispatcher)
        at org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:162)
        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)
        ... 6 more
Caused by: java.lang.NullPointerException
        at org.keycloak.models.cache.infinispan.InfinispanCacheUserProviderFactory.lazyInit(InfinispanCacheUserProviderFactory.java:58)
        at org.keycloak.models.cache.infinispan.InfinispanCacheUserProviderFactory.create(InfinispanCacheUserProviderFactory.java:50)
        at org.keycloak.models.cache.infinispan.InfinispanCacheUserProviderFactory.create(InfinispanCacheUserProviderFactory.java:38)
        at org.keycloak.services.DefaultKeycloakSession.getProvider(DefaultKeycloakSession.java:101)
        at org.keycloak.services.DefaultKeycloakSession.getUserProvider(DefaultKeycloakSession.java:64)
        at org.keycloak.services.DefaultKeycloakSession.userStorage(DefaultKeycloakSession.java:90)
        at org.keycloak.models.UserFederationManager.getUsersCount(UserFederationManager.java:286)
        at org.keycloak.services.managers.ApplianceBootstrap.isNoMasterUser(ApplianceBootstrap.java:50)
        at org.keycloak.services.resources.KeycloakApplication.<init>(KeycloakApplication.java:134)
        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:422)
        at org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:150)
        ... 19 more

16:49:52,628 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "keycloak-server.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.undertow.deployment.default-server.default-host./auth" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./auth: java.lang.RuntimeException: RESTEASY003325: Failed to construct public org.keycloak.services.resources.KeycloakApplication(javax.servlet.ServletContext,org.jboss.resteasy.core.Dispatcher)
    Caused by: java.lang.RuntimeException: RESTEASY003325: Failed to construct public org.keycloak.services.resources.KeycloakApplication(javax.servlet.ServletContext,org.jboss.resteasy.core.Dispatcher)
    Caused by: java.lang.NullPointerException"}}


_______________________________________________
keycloak-user mailing list
keycloak-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-user



_______________________________________________
keycloak-user mailing list
keycloak-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-user

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
_______________________________________________
keycloak-user mailing list
keycloak-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-user