<div dir="ltr"><div>I *think* I tracked it down to this commit:<div><br></div><div><a href="https://github.com/keycloak/keycloak/commit/3bfe3d256ed0c292fbb040fa2276c737c3798864">https://github.com/keycloak/keycloak/commit/3bfe3d256ed0c292fbb040fa2276c737c3798864</a><br></div><div><br></div><div>the '<span style="font-size:13px">org.keycloak.models.jpa.</span><span style="font-size:13px">entities.RealmEntity.</span><span style="font-size:13px">eventsEnabled' field is present in KC 1.0.Final, but not in the 1.0-beta-4.</span></div><div><span style="font-size:13px"><br></span></div><div><br></div></div><div><span style="font-size:13px"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 12, 2014 at 11:50 AM, Matthias Wessendorf <span dir="ltr"><<a href="mailto:matzew@apache.org" target="_blank">matzew@apache.org</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Marek,<div><br></div><div>any chance to get a script to get that kinda migration done manually? I think this is now blocking us from upgrading to 1.0.4.Final (from <span style="font-size:13px">1.0-beta-4, which we used in our 1.0.0.Final)</span></div><div><span style="font-size:13px"><br></span></div><div>thanks,</div><div>Matthias</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 12, 2014 at 10:32 AM, Marek Posolda <span dir="ltr"><<a href="mailto:mposolda@redhat.com" target="_blank">mposolda@redhat.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Unfortunately I don't think that we
have this. We have automatic migration available with liquibase,
but this is from 1.0.0.Final (or newer) to 1.1.0.X .<br>
<br>
Marek<div><div><br>
<br>
On 11.12.2014 16:50, Matthias Wessendorf wrote:<br>
</div></div></div>
<blockquote type="cite"><div><div>
<div dir="ltr">
<div>Hi,<br>
</div>
<div><br>
</div>
<div>I am wondering do you guys have a .sql script for going
from '1.0-beta-4' to '1.0.4.Final' ? </div>
<div><br>
</div>
<div>My motivation is updating the an instance of UPS
1.0.0.Final (was using Keycloak-1.0-beta-4) to latest stable
release candidate (1.0.3-SNAPSHOT, which is using
Keycloak-1.0.4.Final)<br>
</div>
<div><br>
</div>
<div>Deploying the new auth-server (that we build ourselfs), is
giving me this (with Postgres and MySQL)</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>13:32:29,191 ERROR [org.jboss.msc.service.fail] (MSC
service thread 1-15) 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:
Failed to start service</div>
<div><span style="white-space:pre-wrap"> </span>at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904)
[jboss-msc-1.2.2.Final.jar:1.2.2.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[rt.jar:1.7.0_65]</div>
<div><span style="white-space:pre-wrap"> </span>at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_65]</div>
<div><span style="white-space:pre-wrap"> </span>at
java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_65]</div>
<div>Caused by: java.lang.RuntimeException: Failed to construct
public
org.jboss.aerogear.unifiedpush.keycloak.UpsKeycloakApplication(javax.servlet.ServletContext,org.jboss.resteasy.core.Dispatcher)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:160)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.jboss.resteasy.spi.ResteasyProviderFactory.createProviderInstance(ResteasyProviderFactory.java:2211)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.jboss.resteasy.spi.ResteasyDeployment.createApplication(ResteasyDeployment.java:295)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:236)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:112)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36)</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.wildfly.extension.undertow.security.RunAsLifecycleInterceptor.init(RunAsLifecycleInterceptor.java:79)</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:103)</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:220)</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:125)</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:508)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:88)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:72)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
[jboss-msc-1.2.2.Final.jar:1.2.2.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
[jboss-msc-1.2.2.Final.jar:1.2.2.Final]</div>
<div><span style="white-space:pre-wrap"> </span>... 3 more</div>
<div>Caused by: org.keycloak.models.ModelException:
javax.persistence.PersistenceException:
org.hibernate.PropertyAccessException: Null value was assigned
to a property of primitive type setter of
org.keycloak.models.jpa.entities.RealmEntity.eventsEnabled</div>
<div><span style="white-space:pre-wrap"> </span>at
org.keycloak.connections.jpa.PersistenceExceptionConverter.convert(PersistenceExceptionConverter.java:44)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.keycloak.connections.jpa.PersistenceExceptionConverter.invoke(PersistenceExceptionConverter.java:34)</div>
<div><span style="white-space:pre-wrap"> </span>at
com.sun.proxy.$Proxy128.find(Unknown Source)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.keycloak.models.jpa.JpaRealmProvider.getRealm(JpaRealmProvider.java:51)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.keycloak.models.cache.DefaultCacheRealmProvider.getRealm(DefaultCacheRealmProvider.java:173)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.keycloak.services.managers.ApplianceBootstrap.bootstrap(ApplianceBootstrap.java:42)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.keycloak.services.managers.ApplianceBootstrap.bootstrap(ApplianceBootstrap.java:33)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.keycloak.services.resources.KeycloakApplication.setupDefaultRealm(KeycloakApplication.java:137)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.jboss.aerogear.unifiedpush.keycloak.UpsKeycloakApplication.setupDefaultRealm(UpsKeycloakApplication.java:40)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.keycloak.services.resources.KeycloakApplication.<init>(KeycloakApplication.java:86)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.jboss.aerogear.unifiedpush.keycloak.UpsKeycloakApplication.<init>(UpsKeycloakApplication.java:35)</div>
<div><span style="white-space:pre-wrap"> </span>at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method) [rt.jar:1.7.0_65]</div>
<div><span style="white-space:pre-wrap"> </span>at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
[rt.jar:1.7.0_65]</div>
<div><span style="white-space:pre-wrap"> </span>at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[rt.jar:1.7.0_65]</div>
<div><span style="white-space:pre-wrap"> </span>at
java.lang.reflect.Constructor.newInstance(Constructor.java:526)
[rt.jar:1.7.0_65]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:148)</div>
<div><span style="white-space:pre-wrap"> </span>... 18 more</div>
<div>Caused by: javax.persistence.PersistenceException:
org.hibernate.PropertyAccessException: Null value was assigned
to a property of primitive type setter of
org.keycloak.models.jpa.entities.RealmEntity.eventsEnabled</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1763)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:<a href="tel:1694" value="+491694" target="_blank">1694</a>)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.jpa.spi.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:1141)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.jpa.spi.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:1068)</div>
<div><span style="white-space:pre-wrap"> </span>at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[rt.jar:1.7.0_65]</div>
<div><span style="white-space:pre-wrap"> </span>at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[rt.jar:1.7.0_65]</div>
<div><span style="white-space:pre-wrap"> </span>at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[rt.jar:1.7.0_65]</div>
<div><span style="white-space:pre-wrap"> </span>at
java.lang.reflect.Method.invoke(Method.java:606)
[rt.jar:1.7.0_65]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.keycloak.connections.jpa.PersistenceExceptionConverter.invoke(PersistenceExceptionConverter.java:32)</div>
<div><span style="white-space:pre-wrap"> </span>... 32 more</div>
<div>Caused by: org.hibernate.PropertyAccessException: Null
value was assigned to a property of primitive type setter of
org.keycloak.models.jpa.entities.RealmEntity.eventsEnabled</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.property.DirectPropertyAccessor$DirectSetter.set(DirectPropertyAccessor.java:126)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.tuple.entity.AbstractEntityTuplizer.setPropertyValues(AbstractEntityTuplizer.java:713)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.tuple.entity.PojoEntityTuplizer.setPropertyValues(PojoEntityTuplizer.java:362)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.persister.entity.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:4718)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.engine.internal.TwoPhaseLoad.doInitializeEntity(TwoPhaseLoad.java:188)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.engine.internal.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:144)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.loader.plan.exec.process.internal.AbstractRowReader.performTwoPhaseLoad(AbstractRowReader.java:244)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.loader.plan.exec.process.internal.AbstractRowReader.finishUp(AbstractRowReader.java:215)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.loader.plan.exec.process.internal.ResultSetProcessorImpl.extractResults(ResultSetProcessorImpl.java:140)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:138)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:102)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.loader.entity.plan.AbstractLoadPlanBasedEntityLoader.load(AbstractLoadPlanBasedEntityLoader.java:186)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:4126)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.event.internal.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:503)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.event.internal.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:468)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.event.internal.DefaultLoadEventListener.load(DefaultLoadEventListener.java:213)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.event.internal.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:275)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.event.internal.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:151)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.internal.SessionImpl.fireLoad(SessionImpl.java:1070)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.internal.SessionImpl.access$2000(SessionImpl.java:176)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.internal.SessionImpl$IdentifierLoadAccessImpl.load(SessionImpl.java:2551)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.internal.SessionImpl.get(SessionImpl.java:955)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.jpa.spi.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:1110)</div>
<div><span style="white-space:pre-wrap"> </span>... 38 more</div>
<div>Caused by: java.lang.IllegalArgumentException: Can not set
boolean field
org.keycloak.models.jpa.entities.RealmEntity.eventsEnabled to
null value</div>
<div><span style="white-space:pre-wrap"> </span>at
sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:164)
[rt.jar:1.7.0_65]</div>
<div><span style="white-space:pre-wrap"> </span>at
sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:168)
[rt.jar:1.7.0_65]</div>
<div><span style="white-space:pre-wrap"> </span>at
sun.reflect.UnsafeBooleanFieldAccessorImpl.set(UnsafeBooleanFieldAccessorImpl.java:80)
[rt.jar:1.7.0_65]</div>
<div><span style="white-space:pre-wrap"> </span>at
java.lang.reflect.Field.set(Field.java:741) [rt.jar:1.7.0_65]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.property.DirectPropertyAccessor$DirectSetter.set(DirectPropertyAccessor.java:122)</div>
<div><span style="white-space:pre-wrap"> </span>... 60 more</div>
<div><br>
</div>
<div>13:32:29,205 ERROR
[org.jboss.as.controller.management-operation] (Controller
Boot Thread) JBAS014613: Operation ("deploy") failed -
address: ([("deployment" => "auth-server.war")]) - failure
description: {"JBAS014671: 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:
Failed to start service</div>
<div> Caused by: java.lang.RuntimeException: Failed to
construct public
org.jboss.aerogear.unifiedpush.keycloak.UpsKeycloakApplication(javax.servlet.ServletContext,org.jboss.resteasy.core.Dispatcher)</div>
<div> Caused by: org.keycloak.models.ModelException:
javax.persistence.PersistenceException:
org.hibernate.PropertyAccessException: Null value was assigned
to a property of primitive type setter of
org.keycloak.models.jpa.entities.RealmEntity.eventsEnabled</div>
<div> Caused by: javax.persistence.PersistenceException:
org.hibernate.PropertyAccessException: Null value was assigned
to a property of primitive type setter of
org.keycloak.models.jpa.entities.RealmEntity.eventsEnabled</div>
<div> Caused by: org.hibernate.PropertyAccessException: Null
value was assigned to a property of primitive type setter of
org.keycloak.models.jpa.entities.RealmEntity.eventsEnabled</div>
<div> Caused by: java.lang.IllegalArgumentException: Can not
set boolean field
org.keycloak.models.jpa.entities.RealmEntity.eventsEnabled to
null value"}}</div>
<div><span style="white-space:pre-wrap"> </span></div>
<div><br>
</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Matthias<br>
</div>
<div><br>
</div>
-- <br>
<div>Matthias Wessendorf <br>
<br>
blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>
sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a></div>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
keycloak-dev mailing list
<a href="mailto:keycloak-dev@lists.jboss.org" target="_blank">keycloak-dev@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a></pre>
</blockquote>
<br>
</div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div>Matthias Wessendorf <br><br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a></div>
</div>
</div></div></blockquote></div><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Matthias Wessendorf <br><br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a></div>
</div>