[keycloak-user] Upgrade from 1.1.0.Final to 1.4.0.Final - Liquibase script failing
Bill Burke
bburke at redhat.com
Sun Aug 2 09:11:10 EDT 2015
You probably have to export your database to json and re-import it until
we track this down.
On 8/1/2015 11:19 AM, Stephen Flynn wrote:
>
> Hi all,
>
> I'm trying to upgrade Keycloak from 1.1.0.Final to 1.4.0.Final.
>
> The liquibase db scripts are failing. The particular script that is
> failing is 'jpa-changelog-1.2.0.Beta1.xml' with the exception 'Caused
> by: java.lang.ClassCastException: java.math.BigDecimal cannot be cast to
> java.lang.Long'. More stack trace below.
>
> Any ideas as to why this might be happening ? Is there anything else I
> can provide to give more insight ?
>
> best rgds,
>
> Steve F.
>
>
> Environment is...
>
> * wildfly-9.0.1.Final + keycloak-overlay-1.4.0.Final
> * jdk1.7.0_51
> * Oracle 10 + odbcj6.jar (11.2.0.2.0)
>
>
> Liquibase change log from the DB
>
> * 1.0.0.Final sthorger at redhat.com
> META-INF/jpa-changelog-1.0.0.Final.xml 2014-12-04
> 00:55:28.95072 1 EXECUTED
> * 1.1.0.Beta1 sthorger at redhat.com
> META-INF/jpa-changelog-1.1.0.Beta1.xml 2014-12-04
> 00:55:30.070692 2 EXECUTED
> * 1.1.0.Final sthorger at redhat.com
> META-INF/jpa-changelog-1.1.0.Final.xml 2015-01-30
> 00:55:27.065618 3 EXECUTED
>
>
> Error message in log...
>
> 15:12:31,238 INFO [org.keycloak.services.resources.KeycloakApplication]
> (ServerService Thread Pool -- 69) Load config from
> /apps/wildfly/wildfly-9.0.1.Final/standalone/configuration/keycloak-server.json
> 15:12:34,416 INFO
> [org.keycloak.connections.jpa.updater.liquibase.LiquibaseJpaUpdaterProvider]
> (ServerService Thread Pool -- 69) Updating database
> 15:12:35,982 ERROR
> [org.keycloak.connections.jpa.updater.liquibase.LiquibaseJpaUpdaterProvider]
> (ServerService Thread Pool -- 69) Change Set
> META-INF/jpa-changelog-1.2.0.Beta1.xml::1.2.0.Beta1::psilva at redhat.com
> failed. Error: liquibase.exception.CustomChangeException: Update
> 1.2.0.Beta1: Exception when updating data from previous version:
> liquibase.exception.UnexpectedLiquibaseException:
> liquibase.exception.CustomChangeException: Update 1.2.0.Beta1: Exception
> when updating data from previous version
> at
> liquibase.change.custom.CustomChangeWrapper.generateStatements(CustomChangeWrapper.java:185)
> at
> liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1208)
> at liquibase.changelog.ChangeSet.execute(ChangeSet.java:550)
> at
> liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:43)
> at
> liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:73)
> at liquibase.Liquibase.update(Liquibase.java:200)
> at liquibase.Liquibase.update(Liquibase.java:181)
> at
> org.keycloak.connections.jpa.updater.liquibase.LiquibaseJpaUpdaterProvider.update(LiquibaseJpaUpdaterProvider.java:84)
> [keycloak-connections-jpa-liquibase-1.4.0.Final.jar:1.4.0.Final]
> at
> org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory.lazyInit(DefaultJpaConnectionProviderFactory.java:150)
> [keycloak-connections-jpa-1.4.0.Final.jar:1.4.0.Final]
> at
> org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory.create(DefaultJpaConnectionProviderFactory.java:39)
> [keycloak-connections-jpa-1.4.0.Final.jar:1.4.0.Final]
> at
> org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory.create(DefaultJpaConnectionProviderFactory.java:27)
> [keycloak-connections-jpa-1.4.0.Final.jar:1.4.0.Final]
> at
> org.keycloak.services.DefaultKeycloakSession.getProvider(DefaultKeycloakSession.java:99)
> [keycloak-services-1.4.0.Final.jar:1.4.0.Final]
> at
> org.keycloak.models.jpa.JpaRealmProviderFactory.create(JpaRealmProviderFactory.java:34)
> [keycloak-model-jpa-1.4.0.Final.jar:1.4.0.Final]
> at
> org.keycloak.models.jpa.JpaRealmProviderFactory.create(JpaRealmProviderFactory.java:16)
> [keycloak-model-jpa-1.4.0.Final.jar:1.4.0.Final]
> at
> org.keycloak.services.DefaultKeycloakSession.getProvider(DefaultKeycloakSession.java:99)
> [keycloak-services-1.4.0.Final.jar:1.4.0.Final]
> at
> org.keycloak.models.cache.DefaultCacheRealmProvider.getDelegate(DefaultCacheRealmProvider.java:70)
> [keycloak-invalidation-cache-model-1.4.0.Final.jar:1.4.0.Final]
> at
> org.keycloak.models.cache.DefaultCacheRealmProvider.getRealm(DefaultCacheRealmProvider.java:163)
> [keycloak-invalidation-cache-model-1.4.0.Final.jar:1.4.0.Final]
> at
> org.keycloak.services.managers.ApplianceBootstrap.bootstrap(ApplianceBootstrap.java:40)
> [keycloak-services-1.4.0.Final.jar:1.4.0.Final]
> at
> org.keycloak.services.managers.ApplianceBootstrap.bootstrap(ApplianceBootstrap.java:31)
> [keycloak-services-1.4.0.Final.jar:1.4.0.Final]
> at
> org.keycloak.services.resources.KeycloakApplication.setupDefaultRealm(KeycloakApplication.java:158)
> [keycloak-services-1.4.0.Final.jar:1.4.0.Final]
> at
> org.keycloak.services.resources.KeycloakApplication.<init>(KeycloakApplication.java:88)
> [keycloak-services-1.4.0.Final.jar:1.4.0.Final]
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> [rt.jar:1.7.0_51]
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
> [rt.jar:1.7.0_51]
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> [rt.jar:1.7.0_51]
> at
> java.lang.reflect.Constructor.newInstance(Constructor.java:526)
> [rt.jar:1.7.0_51]
> at
> org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:148)
> [resteasy-jaxrs-3.0.11.Final.jar:]
> at
> org.jboss.resteasy.spi.ResteasyProviderFactory.createProviderInstance(ResteasyProviderFactory.java:2211)
> [resteasy-jaxrs-3.0.11.Final.jar:]
> at
> org.jboss.resteasy.spi.ResteasyDeployment.createApplication(ResteasyDeployment.java:295)
> [resteasy-jaxrs-3.0.11.Final.jar:]
> at
> org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:236)
> [resteasy-jaxrs-3.0.11.Final.jar:]
> at
> org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:112)
> [resteasy-jaxrs-3.0.11.Final.jar:]
> at
> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36)
> [resteasy-jaxrs-3.0.11.Final.jar:]
> at
> io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117)
> [undertow-servlet-1.2.9.Final.jar:1.2.9.Final]
> at
> org.wildfly.extension.undertow.security.RunAsLifecycleInterceptor.init(RunAsLifecycleInterceptor.java:78)
> at
> io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:103)
> [undertow-servlet-1.2.9.Final.jar:1.2.9.Final]
> at
> io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:230)
> [undertow-servlet-1.2.9.Final.jar:1.2.9.Final]
> at
> io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:131)
> [undertow-servlet-1.2.9.Final.jar:1.2.9.Final]
> at
> io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:511)
> [undertow-servlet-1.2.9.Final.jar:1.2.9.Final]
> 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:471)
> [rt.jar:1.7.0_51]
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> [rt.jar:1.7.0_51]
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> [rt.jar:1.7.0_51]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> [rt.jar:1.7.0_51]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
> at org.jboss.threads.JBossThread.run(JBossThread.java:320)
> Caused by: liquibase.exception.CustomChangeException: Update
> 1.2.0.Beta1: Exception when updating data from previous version
> at
> org.keycloak.connections.jpa.updater.liquibase.custom.JpaUpdate1_2_0_Beta1.generateStatementsImpl(JpaUpdate1_2_0_Beta1.java:43)
> [keycloak-connections-jpa-liquibase-1.4.0.Final.jar:1.4.0.Final]
> at
> org.keycloak.connections.jpa.updater.liquibase.custom.CustomKeycloakTask.generateStatements(CustomKeycloakTask.java:79)
> [keycloak-connections-jpa-liquibase-1.4.0.Final.jar:1.4.0.Final]
> at
> liquibase.change.custom.CustomChangeWrapper.generateStatements(CustomChangeWrapper.java:178)
> ... 44 more
> Caused by: java.lang.ClassCastException: java.math.BigDecimal cannot be
> cast to java.lang.Long
> at
> org.keycloak.connections.jpa.updater.liquibase.custom.JpaUpdate1_2_0_Beta1.addDefaultProtocolMappers(JpaUpdate1_2_0_Beta1.java:296)
> [keycloak-connections-jpa-liquibase-1.4.0.Final.jar:1.4.0.Final]
> at
> org.keycloak.connections.jpa.updater.liquibase.custom.JpaUpdate1_2_0_Beta1.generateStatementsImpl(JpaUpdate1_2_0_Beta1.java:41)
> [keycloak-connections-jpa-liquibase-1.4.0.Final.jar:1.4.0.Final]
> ... 46 more
>
> --
> ===================================================
>
> *Stephen Flynn*
>
> *Director, JF Technology (UK) Ltd*
>
> Cell (UK) : +44 7768 003 882
> Phone : +44 20 7833 8346
> IM : xmpp:stephen.flynn at jftechnology.com
> IM : aim:stephen.flynn at jftechnology.com
> Website : http://www.jftechnology.com
> Tech support : support at jftechnology.com <mailto:support at jftechnology.com>
>
> ===================================================
>
>
>
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
More information about the keycloak-user
mailing list