<div dir="ltr"><div>> <span style="font-size:12.8000001907349px">By the way, are you using H2 in production?</span></div><div><span style="font-size:12.8000001907349px">We are still developing the platforms that rely on Keycloak. H2 has worked well (we have low traffic with internal users only), but moving to MySQL is something we'll be doing.</span></div><div><br></div><div>> <span style="font-size:12.8000001907349px">What version did you upgrade from?<br></span>The table was upgraded from 1.0.4 to 1.2.0.Beta1, then the error appeared attempting to upgrade to CR1.</div><div><br></div><div>><span style="font-size:12.8000001907349px">Maybe you can try to manually connect to your H2 database and set the fields "DIRECT_GRANTS_ONLY" on CLIENT table to non-null value manually through SQL.</span></div><div><span style="font-size:12.8000001907349px">I'll spend some time this week looking at the tables and the offending column to see if I can manually update it and get the upgrade working.</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 6, 2015 at 9:15 PM, Stian Thorgersen <span dir="ltr"><<a href="mailto:stian@redhat.com" target="_blank">stian@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What version did you upgrade from?<br>
<div class="HOEnZb"><div class="h5"><br>
----- Original Message -----<br>
> From: "Matthew Casperson" <<a href="mailto:matthew.casperson@autogeneral.com.au">matthew.casperson@autogeneral.com.au</a>><br>
> To: <a href="mailto:keycloak-dev@lists.jboss.org">keycloak-dev@lists.jboss.org</a><br>
> Sent: Wednesday, May 6, 2015 12:59:03 AM<br>
> Subject: [keycloak-dev] Problem upgrading from 1.2.0.Beta1 to CR1<br>
><br>
> I received this error after copying the h2 database from my existing<br>
> 1.2.0.Beta1 deployment into a fresh copy of CR1.<br>
> Maybe a bug with the upgrade process?<br>
> jboss.undertow.deployment.default-server.default-host./auth: Failed to start<br>
> service<br>
> at<br>
> org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904)<br>
> [jboss-msc-1.2.2.Final.jar:1.2.2.Final]<br>
> at<br>
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)<br>
> [rt.jar:1.7.0_65]<br>
> at<br>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)<br>
> [rt.jar:1.7.0_65]<br>
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_65]<br>
> Caused by: java.lang.RuntimeException: Failed to construct public<br>
> org.keycloak.services.resources.KeycloakApplication(javax.servlet.ServletContext,org.jboss.resteasy.core.Dispatcher)<br>
> at<br>
> org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:160)<br>
> at<br>
> org.jboss.resteasy.spi.ResteasyProviderFactory.createProviderInstance(ResteasyProviderFactory.java:2211)<br>
> at<br>
> org.jboss.resteasy.spi.ResteasyDeployment.createApplication(ResteasyDeployment.java:295)<br>
> at<br>
> org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:236)<br>
> at<br>
> org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:112)<br>
> at<br>
> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36)<br>
> at<br>
> io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117)<br>
> at<br>
> org.wildfly.extension.undertow.security.RunAsLifecycleInterceptor.init(RunAsLifecycleInterceptor.java:79)<br>
> at<br>
> io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:103)<br>
> at<br>
> io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:220)<br>
> at<br>
> io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:125)<br>
> at<br>
> io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:508)<br>
> at<br>
> org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:88)<br>
> at<br>
> org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:72)<br>
> at<br>
> org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)<br>
> [jboss-msc-1.2.2.Final.jar:1.2.2.Final]<br>
> at<br>
> org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)<br>
> [jboss-msc-1.2.2.Final.jar:1.2.2.Final]<br>
> ... 3 more<br>
> Caused by: org.keycloak.models.ModelException:<br>
> javax.persistence.PersistenceException:<br>
> org.hibernate.PropertyAccessException: Null value was assigned to a property<br>
> of primitive type setter of<br>
> org.keycloak.models.jpa.entities.ClientEntity.directGrantsOnly<br>
> at<br>
> org.keycloak.connections.jpa.PersistenceExceptionConverter.convert(PersistenceExceptionConverter.java:44)<br>
> at<br>
> org.keycloak.connections.jpa.PersistenceExceptionConverter.invoke(PersistenceExceptionConverter.java:34)<br>
> at com.sun.proxy.$Proxy57.find(Unknown Source)<br>
> at<br>
> org.keycloak.models.jpa.JpaRealmProvider.getRealm(JpaRealmProvider.java:63)<br>
> at<br>
> org.keycloak.models.cache.DefaultCacheRealmProvider.getRealm(DefaultCacheRealmProvider.java:163)<br>
> at<br>
> org.keycloak.services.managers.ApplianceBootstrap.bootstrap(ApplianceBootstrap.java:40)<br>
> at<br>
> org.keycloak.services.managers.ApplianceBootstrap.bootstrap(ApplianceBootstrap.java:31)<br>
> at<br>
> org.keycloak.services.resources.KeycloakApplication.setupDefaultRealm(KeycloakApplication.java:160)<br>
> at<br>
> org.keycloak.services.resources.KeycloakApplication.<init>(KeycloakApplication.java:85)<br>
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)<br>
> [rt.jar:1.7.0_65]<br>
> at<br>
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)<br>
> [rt.jar:1.7.0_65]<br>
> at<br>
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)<br>
> [rt.jar:1.7.0_65]<br>
> at java.lang.reflect.Constructor.newInstance(Constructor.java:526)<br>
> [rt.jar:1.7.0_65]<br>
> at<br>
> org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:148)<br>
> ... 18 more<br>
> Caused by: javax.persistence.PersistenceException:<br>
> org.hibernate.PropertyAccessException: Null value was assigned to a property<br>
> of primitive type setter of<br>
> org.keycloak.models.jpa.entities.ClientEntity.directGrantsOnly<br>
> at<br>
> org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1763)<br>
> at<br>
> org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1694)<br>
> at<br>
> org.hibernate.jpa.spi.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:1141)<br>
> at<br>
> org.hibernate.jpa.spi.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:1068)<br>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
> [rt.jar:1.7.0_65]<br>
> at<br>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)<br>
> [rt.jar:1.7.0_65]<br>
> at<br>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br>
> [rt.jar:1.7.0_65]<br>
> at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_65]<br>
> at<br>
> org.keycloak.connections.jpa.PersistenceExceptionConverter.invoke(PersistenceExceptionConverter.java:32)<br>
> ... 30 more<br>
> Caused by: org.hibernate.PropertyAccessException: Null value was assigned to<br>
> a property of primitive type setter of<br>
> org.keycloak.models.jpa.entities.ClientEntity.directGrantsOnly<br>
> at<br>
> org.hibernate.property.DirectPropertyAccessor$DirectSetter.set(DirectPropertyAccessor.java:126)<br>
> at<br>
> org.hibernate.tuple.entity.AbstractEntityTuplizer.setPropertyValues(AbstractEntityTuplizer.java:713)<br>
> at<br>
> org.hibernate.tuple.entity.PojoEntityTuplizer.setPropertyValues(PojoEntityTuplizer.java:362)<br>
> at<br>
> org.hibernate.persister.entity.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:4718)<br>
> at<br>
> org.hibernate.engine.internal.TwoPhaseLoad.doInitializeEntity(TwoPhaseLoad.java:188)<br>
> at<br>
> org.hibernate.engine.internal.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:144)<br>
> at<br>
> org.hibernate.loader.plan.exec.process.internal.AbstractRowReader.performTwoPhaseLoad(AbstractRowReader.java:244)<br>
> at<br>
> org.hibernate.loader.plan.exec.process.internal.AbstractRowReader.finishUp(AbstractRowReader.java:215)<br>
> at<br>
> org.hibernate.loader.plan.exec.process.internal.ResultSetProcessorImpl.extractResults(ResultSetProcessorImpl.java:140)<br>
> at<br>
> org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:138)<br>
> at<br>
> org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:102)<br>
> at<br>
> org.hibernate.loader.entity.plan.AbstractLoadPlanBasedEntityLoader.load(AbstractLoadPlanBasedEntityLoader.java:186)<br>
> at<br>
> org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:4126)<br>
> at<br>
> org.hibernate.event.internal.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:503)<br>
> at<br>
> org.hibernate.event.internal.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:468)<br>
> at<br>
> org.hibernate.event.internal.DefaultLoadEventListener.load(DefaultLoadEventListener.java:213)<br>
> at<br>
> org.hibernate.event.internal.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:275)<br>
> at<br>
> org.hibernate.event.internal.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:151)<br>
> at org.hibernate.internal.SessionImpl.fireLoad(SessionImpl.java:1070)<br>
> at org.hibernate.internal.SessionImpl.access$2000(SessionImpl.java:176)<br>
> at<br>
> org.hibernate.internal.SessionImpl$IdentifierLoadAccessImpl.load(SessionImpl.java:2551)<br>
> at org.hibernate.internal.SessionImpl.get(SessionImpl.java:955)<br>
> at<br>
> org.hibernate.jpa.spi.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:1110)<br>
> ... 36 more<br>
> Caused by: java.lang.IllegalArgumentException: Can not set boolean field<br>
> org.keycloak.models.jpa.entities.ClientEntity.directGrantsOnly to null value<br>
> at<br>
> sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:164)<br>
> [rt.jar:1.7.0_65]<br>
> at<br>
> sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:168)<br>
> [rt.jar:1.7.0_65]<br>
> at<br>
> sun.reflect.UnsafeBooleanFieldAccessorImpl.set(UnsafeBooleanFieldAccessorImpl.java:80)<br>
> [rt.jar:1.7.0_65]<br>
> at java.lang.reflect.Field.set(Field.java:741) [rt.jar:1.7.0_65]<br>
> at<br>
> org.hibernate.property.DirectPropertyAccessor$DirectSetter.set(DirectPropertyAccessor.java:122)<br>
> ... 58 more<br>
><br>
> --<br>
> Matthew Casperson<br>
> Senior Front End Developer<br>
> Technology, Space & Distribution<br>
> Auto & General Holdings Pty Ltd<br>
> P: 07) 3377 8751 (Direct: 3377 8751 )<br>
> F: 07) 3377 8833<br>
><br>
><br>
><br>
</div></div><div class="HOEnZb"><div class="h5">> This email is sent by Auto & General Insurance Company Ltd, Auto & General<br>
> Services Pty Ltd, Auto & General Holdings Pty Ltd or a related body<br>
> corporate (Auto & General) and is for the intended addressee.<br>
> The views expressed in this email and attachments (email) reflect the views<br>
> of the stated author but may not reflect views of Auto & General. This email<br>
> is confidential and subject to copyright.<br>
> It may be privileged. If you are not the intended addressee, confidentiality<br>
> and privilege have not been waived and any use, interference with, or<br>
> disclosure of this email is unauthorised.<br>
> If you are not the intended addressee please immediately notify the sender<br>
> and then delete the email. Auto & General does not warrant that this email<br>
> is error or virus free.<br>
><br>
> _______________________________________________<br>
> keycloak-dev mailing list<br>
> <a href="mailto:keycloak-dev@lists.jboss.org">keycloak-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/keycloak-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><b><font face="tahoma, sans-serif">Matthew Casperson</font></b></div><div><b><font face="tahoma, sans-serif">Senior Front End Developer</font></b></div><div><font face="tahoma, sans-serif">Technology, Space & Distribution</font></div><div><font face="tahoma, sans-serif">Auto & General Holdings Pty Ltd</font></div><div><font face="tahoma, sans-serif">P: 07) 3377 </font><span style="font-family:tahoma,sans-serif;font-size:small">8751</span><font face="tahoma, sans-serif"> (Direct: 3377 </font><span style="font-family:tahoma,sans-serif;font-size:small">8751</span><font face="tahoma, sans-serif">)</font></div><div><font face="tahoma, sans-serif">F: 07) 3377 8833<br><br></font></div><img src="https://sites.google.com/a/autogeneral.com.au/logos/_/rsrc/1375661597693/home/autogeneral.gif" style="border:0px none;max-width:100%;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:18px"><br></div></div></div></div>
</div>
<br>
<pre style="font-family:Menlo,Monaco,'Courier New',monospace;font-size:12px;white-space:pre-wrap;padding:8.5px;color:rgb(51,51,51);border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:4px;border-bottom-left-radius:4px;margin-top:0px;margin-bottom:9px;line-height:18px;background-color:rgb(245,245,245);border:1px solid rgba(0,0,0,0.14902);word-break:break-all;word-wrap:break-word">This email is sent by Auto & General Insurance Company Ltd, Auto & General Services Pty Ltd, Auto & General Holdings Pty Ltd or a related body corporate (Auto & General) and is for the intended addressee.
The views expressed in this email and attachments (email) reflect the views of the stated author but may not reflect views of Auto & General. This email is confidential and subject to copyright.
It may be privileged. If you are not the intended addressee, confidentiality and privilege have not been waived and any use, interference with, or disclosure of this email is unauthorised.
If you are not the intended addressee please immediately notify the sender and then delete the email. Auto & General does not warrant that this email is error or virus free.</pre>