<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
Hi all,<br>
<br>
<font face="Helvetica, Arial, sans-serif">I'm trying to upgrade
Keycloak from 1.1.0.Final to 1.4.0.Final. <br>
<br>
The liquibase db scripts are failing. The particular script that
is failing is '</font><font face="Helvetica, Arial, sans-serif">jpa-changelog-1.2.0.Beta1.xml'
with the exception '</font><font face="Helvetica, Arial,
sans-serif">Caused by: java.lang.ClassCastException:
java.math.BigDecimal cannot be cast to java.lang.Long'. More stack
trace below.<br>
<br>
Any ideas as to why this might be happening ? Is there anything
else I can provide to give more insight ?<br>
<br>
best rgds,<br>
<br>
Steve F.<br>
<br>
</font>
<h4><font face="Helvetica, Arial, sans-serif">Environment is...</font></h4>
<ul>
<li><font face="Helvetica, Arial, sans-serif">wildfly-9.0.1.Final
+ keycloak-overlay-1.4.0.Final</font></li>
<li><font face="Helvetica, Arial, sans-serif">jdk1.7.0_51</font></li>
<li><font face="Helvetica, Arial, sans-serif">Oracle 10 +
odbcj6.jar (11.2.0.2.0) <br>
</font></li>
</ul>
<h4><font face="Helvetica, Arial, sans-serif">Liquibase change log
from the DB</font><br>
</h4>
<ul>
<li><font face="Helvetica, Arial, sans-serif"> 1.0.0.Final
<a class="moz-txt-link-abbreviated" href="mailto:sthorger@redhat.com">sthorger@redhat.com</a> META-INF/jpa-changelog-1.0.0.Final.xml
2014-12-04 00:55:28.95072 1 EXECUTED</font></li>
<li><font face="Helvetica, Arial, sans-serif"> 1.1.0.Beta1
<a class="moz-txt-link-abbreviated" href="mailto:sthorger@redhat.com">sthorger@redhat.com</a> META-INF/jpa-changelog-1.1.0.Beta1.xml
2014-12-04 00:55:30.070692 2 EXECUTED</font></li>
<li><font face="Helvetica, Arial, sans-serif"> 1.1.0.Final
<a class="moz-txt-link-abbreviated" href="mailto:sthorger@redhat.com">sthorger@redhat.com</a> META-INF/jpa-changelog-1.1.0.Final.xml
2015-01-30 00:55:27.065618 3 EXECUTED</font></li>
</ul>
<h4><font face="Helvetica, Arial, sans-serif">Error message in
log...</font></h4>
<font face="Helvetica, Arial, sans-serif"></font>
<div class="moz-signature">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<br>
15:12:34,416 INFO
[org.keycloak.connections.jpa.updater.liquibase.LiquibaseJpaUpdaterProvider]
(ServerService Thread Pool -- 69) Updating database<br>
15:12:35,982 ERROR
[org.keycloak.connections.jpa.updater.liquibase.LiquibaseJpaUpdaterProvider]
(ServerService Thread Pool -- 69) Change Set
<a class="moz-txt-link-abbreviated" href="mailto:META-INF/jpa-changelog-1.2.0.Beta1.xml::1.2.0.Beta1::psilva@redhat.com">META-INF/jpa-changelog-1.2.0.Beta1.xml::1.2.0.Beta1::psilva@redhat.com</a>
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<br>
at
liquibase.change.custom.CustomChangeWrapper.generateStatements(CustomChangeWrapper.java:185)<br>
at
liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1208)<br>
at
liquibase.changelog.ChangeSet.execute(ChangeSet.java:550)<br>
at
liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:43)<br>
at
liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:73)<br>
at liquibase.Liquibase.update(Liquibase.java:200)<br>
at liquibase.Liquibase.update(Liquibase.java:181)<br>
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]<br>
at
org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory.lazyInit(DefaultJpaConnectionProviderFactory.java:150)
[keycloak-connections-jpa-1.4.0.Final.jar:1.4.0.Final]<br>
at
org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory.create(DefaultJpaConnectionProviderFactory.java:39)
[keycloak-connections-jpa-1.4.0.Final.jar:1.4.0.Final]<br>
at
org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory.create(DefaultJpaConnectionProviderFactory.java:27)
[keycloak-connections-jpa-1.4.0.Final.jar:1.4.0.Final]<br>
at
org.keycloak.services.DefaultKeycloakSession.getProvider(DefaultKeycloakSession.java:99)
[keycloak-services-1.4.0.Final.jar:1.4.0.Final]<br>
at
org.keycloak.models.jpa.JpaRealmProviderFactory.create(JpaRealmProviderFactory.java:34)
[keycloak-model-jpa-1.4.0.Final.jar:1.4.0.Final]<br>
at
org.keycloak.models.jpa.JpaRealmProviderFactory.create(JpaRealmProviderFactory.java:16)
[keycloak-model-jpa-1.4.0.Final.jar:1.4.0.Final]<br>
at
org.keycloak.services.DefaultKeycloakSession.getProvider(DefaultKeycloakSession.java:99)
[keycloak-services-1.4.0.Final.jar:1.4.0.Final]<br>
at
org.keycloak.models.cache.DefaultCacheRealmProvider.getDelegate(DefaultCacheRealmProvider.java:70)
[keycloak-invalidation-cache-model-1.4.0.Final.jar:1.4.0.Final]<br>
at
org.keycloak.models.cache.DefaultCacheRealmProvider.getRealm(DefaultCacheRealmProvider.java:163)
[keycloak-invalidation-cache-model-1.4.0.Final.jar:1.4.0.Final]<br>
at
org.keycloak.services.managers.ApplianceBootstrap.bootstrap(ApplianceBootstrap.java:40)
[keycloak-services-1.4.0.Final.jar:1.4.0.Final]<br>
at
org.keycloak.services.managers.ApplianceBootstrap.bootstrap(ApplianceBootstrap.java:31)
[keycloak-services-1.4.0.Final.jar:1.4.0.Final]<br>
at
org.keycloak.services.resources.KeycloakApplication.setupDefaultRealm(KeycloakApplication.java:158)
[keycloak-services-1.4.0.Final.jar:1.4.0.Final]<br>
at
org.keycloak.services.resources.KeycloakApplication.<init>(KeycloakApplication.java:88)
[keycloak-services-1.4.0.Final.jar:1.4.0.Final]<br>
at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method) [rt.jar:1.7.0_51]<br>
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
[rt.jar:1.7.0_51]<br>
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[rt.jar:1.7.0_51]<br>
at
java.lang.reflect.Constructor.newInstance(Constructor.java:526)
[rt.jar:1.7.0_51]<br>
at
org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:148)
[resteasy-jaxrs-3.0.11.Final.jar:]<br>
at
org.jboss.resteasy.spi.ResteasyProviderFactory.createProviderInstance(ResteasyProviderFactory.java:2211)
[resteasy-jaxrs-3.0.11.Final.jar:]<br>
at
org.jboss.resteasy.spi.ResteasyDeployment.createApplication(ResteasyDeployment.java:295)
[resteasy-jaxrs-3.0.11.Final.jar:]<br>
at
org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:236)
[resteasy-jaxrs-3.0.11.Final.jar:]<br>
at
org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:112)
[resteasy-jaxrs-3.0.11.Final.jar:]<br>
at
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36)
[resteasy-jaxrs-3.0.11.Final.jar:]<br>
at
io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117)
[undertow-servlet-1.2.9.Final.jar:1.2.9.Final]<br>
at
org.wildfly.extension.undertow.security.RunAsLifecycleInterceptor.init(RunAsLifecycleInterceptor.java:78)<br>
at
io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:103)
[undertow-servlet-1.2.9.Final.jar:1.2.9.Final]<br>
at
io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:230)
[undertow-servlet-1.2.9.Final.jar:1.2.9.Final]<br>
at
io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:131)
[undertow-servlet-1.2.9.Final.jar:1.2.9.Final]<br>
at
io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:511)
[undertow-servlet-1.2.9.Final.jar:1.2.9.Final]<br>
at
org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:101)<br>
at
org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)<br>
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
[rt.jar:1.7.0_51]<br>
at
java.util.concurrent.FutureTask.run(FutureTask.java:262)
[rt.jar:1.7.0_51]<br>
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[rt.jar:1.7.0_51]<br>
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_51]<br>
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]<br>
at org.jboss.threads.JBossThread.run(JBossThread.java:320)<br>
Caused by: liquibase.exception.CustomChangeException: Update
1.2.0.Beta1: Exception when updating data from previous version<br>
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]<br>
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]<br>
at
liquibase.change.custom.CustomChangeWrapper.generateStatements(CustomChangeWrapper.java:178)<br>
... 44 more<br>
Caused by: java.lang.ClassCastException: java.math.BigDecimal
cannot be cast to java.lang.Long<br>
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]<br>
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]<br>
... 46 more<br>
<br>
-- <br>
===================================================
<p><b>Stephen Flynn</b></p>
<p><b>Director, JF Technology (UK) Ltd</b></p>
<div>
<table style="font-size:smaller; font-family:monospace;">
<tbody>
<tr>
<td style="font-style:italic;text-align:right;">Cell (UK)
: </td>
<td>+44 7768 003 882</td>
</tr>
<tr>
<td style="font-style:italic;text-align:right;">Phone : </td>
<td>+44 20 7833 8346</td>
</tr>
<tr>
<td style="font-style:italic;text-align:right;">IM : </td>
<td><a class="moz-txt-link-abbreviated" href="mailto:xmpp:stephen.flynn@jftechnology.com">xmpp:stephen.flynn@jftechnology.com</a></td>
</tr>
<tr>
<td style="font-style:italic;text-align:right;">IM : </td>
<td><a class="moz-txt-link-abbreviated" href="mailto:aim:stephen.flynn@jftechnology.com">aim:stephen.flynn@jftechnology.com</a></td>
</tr>
<tr>
<td style="font-style:italic;text-align:right;">Website :
</td>
<td><a href="http://www.jftechnology.com">http://www.jftechnology.com</a></td>
</tr>
<tr>
<td style="font-style:italic;text-align:right;">Tech
support : </td>
<td><a href="mailto:support@jftechnology.com">support@jftechnology.com</a></td>
</tr>
</tbody>
</table>
===================================================
<table>
</table>
</div>
</div>
</body>
</html>