[keycloak-dev] Problem upgrading from 1.2.0.Beta1 to CR1

Matthew Casperson matthew.casperson at autogeneral.com.au
Thu May 7 16:55:14 EDT 2015


I can't make any promises, but I will certainly try :)

- Matt

On Thu, May 7, 2015 at 2:08 PM, Stian Thorgersen <stian at redhat.com> wrote:

> Just tried upgrading to 1.2.0.Beta1 from 1.0.4 and can confirm there's a
> problem.
>
> If we get a fix in master can you try it out before we release 1.2.0.Final
> next week?
>
> ----- Original Message -----
> > From: "Matthew Casperson" <matthew.casperson at autogeneral.com.au>
> > To: "Stian Thorgersen" <stian at redhat.com>, mposolda at redhat.com
> > Cc: keycloak-dev at lists.jboss.org
> > Sent: Wednesday, May 6, 2015 10:51:50 PM
> > Subject: Re: [keycloak-dev] Problem upgrading from 1.2.0.Beta1 to CR1
> >
> > > By the way, are you using H2 in production?
> > 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.
> >
> > > What version did you upgrade from?
> > The table was upgraded from 1.0.4 to 1.2.0.Beta1, then the error appeared
> > attempting to upgrade to CR1.
> >
> > >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.
> > 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.
> >
> > On Wed, May 6, 2015 at 9:15 PM, Stian Thorgersen <stian at redhat.com>
> wrote:
> >
> > > What version did you upgrade from?
> > >
> > > ----- Original Message -----
> > > > From: "Matthew Casperson" <matthew.casperson at autogeneral.com.au>
> > > > To: keycloak-dev at lists.jboss.org
> > > > Sent: Wednesday, May 6, 2015 12:59:03 AM
> > > > Subject: [keycloak-dev] Problem upgrading from 1.2.0.Beta1 to CR1
> > > >
> > > > I received this error after copying the h2 database from my existing
> > > > 1.2.0.Beta1 deployment into a fresh copy of CR1.
> > > > Maybe a bug with the upgrade process?
> > > > jboss.undertow.deployment.default-server.default-host./auth: Failed
> to
> > > start
> > > > service
> > > >       at
> > > >
> > >
> org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904)
> > > >       [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
> > > >       at
> > > >
> > >
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> > > >       [rt.jar:1.7.0_65]
> > > >       at
> > > >
> > >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> > > >       [rt.jar:1.7.0_65]
> > > >       at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_65]
> > > > Caused by: java.lang.RuntimeException: 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:160)
> > > >       at
> > > >
> > >
> org.jboss.resteasy.spi.ResteasyProviderFactory.createProviderInstance(ResteasyProviderFactory.java:2211)
> > > >       at
> > > >
> > >
> org.jboss.resteasy.spi.ResteasyDeployment.createApplication(ResteasyDeployment.java:295)
> > > >       at
> > > >
> > >
> org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:236)
> > > >       at
> > > >
> > >
> org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:112)
> > > >       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:79)
> > > >       at
> > > >
> > >
> io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:103)
> > > >       at
> > > >
> > >
> io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:220)
> > > >       at
> > > >
> > >
> io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:125)
> > > >       at
> > > >
> > >
> io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:508)
> > > >       at
> > > >
> > >
> org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:88)
> > > >       at
> > > >
> > >
> org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:72)
> > > >       at
> > > >
> > >
> org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
> > > >       [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
> > > >       at
> > > >
> > >
> org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
> > > >       [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
> > > >       ... 3 more
> > > > 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.ClientEntity.directGrantsOnly
> > > >       at
> > > >
> > >
> org.keycloak.connections.jpa.PersistenceExceptionConverter.convert(PersistenceExceptionConverter.java:44)
> > > >       at
> > > >
> > >
> org.keycloak.connections.jpa.PersistenceExceptionConverter.invoke(PersistenceExceptionConverter.java:34)
> > > >       at com.sun.proxy.$Proxy57.find(Unknown Source)
> > > >       at
> > > >
> > >
> org.keycloak.models.jpa.JpaRealmProvider.getRealm(JpaRealmProvider.java:63)
> > > >       at
> > > >
> > >
> org.keycloak.models.cache.DefaultCacheRealmProvider.getRealm(DefaultCacheRealmProvider.java:163)
> > > >       at
> > > >
> > >
> org.keycloak.services.managers.ApplianceBootstrap.bootstrap(ApplianceBootstrap.java:40)
> > > >       at
> > > >
> > >
> org.keycloak.services.managers.ApplianceBootstrap.bootstrap(ApplianceBootstrap.java:31)
> > > >       at
> > > >
> > >
> org.keycloak.services.resources.KeycloakApplication.setupDefaultRealm(KeycloakApplication.java:160)
> > > >       at
> > > >
> > >
> org.keycloak.services.resources.KeycloakApplication.<init>(KeycloakApplication.java:85)
> > > >       at
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> > > Method)
> > > >       [rt.jar:1.7.0_65]
> > > >       at
> > > >
> > >
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
> > > >       [rt.jar:1.7.0_65]
> > > >       at
> > > >
> > >
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> > > >       [rt.jar:1.7.0_65]
> > > >       at
> java.lang.reflect.Constructor.newInstance(Constructor.java:526)
> > > >       [rt.jar:1.7.0_65]
> > > >       at
> > > >
> > >
> org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:148)
> > > >       ... 18 more
> > > > 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.ClientEntity.directGrantsOnly
> > > >       at
> > > >
> > >
> org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1763)
> > > >       at
> > > >
> > >
> org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1694)
> > > >       at
> > > >
> > >
> org.hibernate.jpa.spi.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:1141)
> > > >       at
> > > >
> > >
> org.hibernate.jpa.spi.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:1068)
> > > >       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > >       [rt.jar:1.7.0_65]
> > > >       at
> > > >
> > >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> > > >       [rt.jar:1.7.0_65]
> > > >       at
> > > >
> > >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > > >       [rt.jar:1.7.0_65]
> > > >       at java.lang.reflect.Method.invoke(Method.java:606)
> > > [rt.jar:1.7.0_65]
> > > >       at
> > > >
> > >
> org.keycloak.connections.jpa.PersistenceExceptionConverter.invoke(PersistenceExceptionConverter.java:32)
> > > >       ... 30 more
> > > > Caused by: org.hibernate.PropertyAccessException: Null value was
> > > assigned to
> > > > a property of primitive type setter of
> > > > org.keycloak.models.jpa.entities.ClientEntity.directGrantsOnly
> > > >       at
> > > >
> > >
> org.hibernate.property.DirectPropertyAccessor$DirectSetter.set(DirectPropertyAccessor.java:126)
> > > >       at
> > > >
> > >
> org.hibernate.tuple.entity.AbstractEntityTuplizer.setPropertyValues(AbstractEntityTuplizer.java:713)
> > > >       at
> > > >
> > >
> org.hibernate.tuple.entity.PojoEntityTuplizer.setPropertyValues(PojoEntityTuplizer.java:362)
> > > >       at
> > > >
> > >
> org.hibernate.persister.entity.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:4718)
> > > >       at
> > > >
> > >
> org.hibernate.engine.internal.TwoPhaseLoad.doInitializeEntity(TwoPhaseLoad.java:188)
> > > >       at
> > > >
> > >
> org.hibernate.engine.internal.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:144)
> > > >       at
> > > >
> > >
> org.hibernate.loader.plan.exec.process.internal.AbstractRowReader.performTwoPhaseLoad(AbstractRowReader.java:244)
> > > >       at
> > > >
> > >
> org.hibernate.loader.plan.exec.process.internal.AbstractRowReader.finishUp(AbstractRowReader.java:215)
> > > >       at
> > > >
> > >
> org.hibernate.loader.plan.exec.process.internal.ResultSetProcessorImpl.extractResults(ResultSetProcessorImpl.java:140)
> > > >       at
> > > >
> > >
> org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:138)
> > > >       at
> > > >
> > >
> org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:102)
> > > >       at
> > > >
> > >
> org.hibernate.loader.entity.plan.AbstractLoadPlanBasedEntityLoader.load(AbstractLoadPlanBasedEntityLoader.java:186)
> > > >       at
> > > >
> > >
> org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:4126)
> > > >       at
> > > >
> > >
> org.hibernate.event.internal.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:503)
> > > >       at
> > > >
> > >
> org.hibernate.event.internal.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:468)
> > > >       at
> > > >
> > >
> org.hibernate.event.internal.DefaultLoadEventListener.load(DefaultLoadEventListener.java:213)
> > > >       at
> > > >
> > >
> org.hibernate.event.internal.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:275)
> > > >       at
> > > >
> > >
> org.hibernate.event.internal.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:151)
> > > >       at
> > > org.hibernate.internal.SessionImpl.fireLoad(SessionImpl.java:1070)
> > > >       at
> > > org.hibernate.internal.SessionImpl.access$2000(SessionImpl.java:176)
> > > >       at
> > > >
> > >
> org.hibernate.internal.SessionImpl$IdentifierLoadAccessImpl.load(SessionImpl.java:2551)
> > > >       at org.hibernate.internal.SessionImpl.get(SessionImpl.java:955)
> > > >       at
> > > >
> > >
> org.hibernate.jpa.spi.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:1110)
> > > >       ... 36 more
> > > > Caused by: java.lang.IllegalArgumentException: Can not set boolean
> field
> > > > org.keycloak.models.jpa.entities.ClientEntity.directGrantsOnly to
> null
> > > value
> > > >       at
> > > >
> > >
> sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:164)
> > > >       [rt.jar:1.7.0_65]
> > > >       at
> > > >
> > >
> sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:168)
> > > >       [rt.jar:1.7.0_65]
> > > >       at
> > > >
> > >
> sun.reflect.UnsafeBooleanFieldAccessorImpl.set(UnsafeBooleanFieldAccessorImpl.java:80)
> > > >       [rt.jar:1.7.0_65]
> > > >       at java.lang.reflect.Field.set(Field.java:741)
> [rt.jar:1.7.0_65]
> > > >       at
> > > >
> > >
> org.hibernate.property.DirectPropertyAccessor$DirectSetter.set(DirectPropertyAccessor.java:122)
> > > >       ... 58 more
> > > >
> > > > --
> > > > Matthew Casperson
> > > > Senior Front End Developer
> > > > Technology, Space & Distribution
> > > > Auto & General Holdings Pty Ltd
> > > > P: 07) 3377 8751 (Direct: 3377 8751 )
> > > > F: 07) 3377 8833
> > > >
> > > >
> > > >
> > > > 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.
> > > >
> > > > _______________________________________________
> > > > keycloak-dev mailing list
> > > > keycloak-dev at lists.jboss.org
> > > > https://lists.jboss.org/mailman/listinfo/keycloak-dev
> > >
> >
> >
> >
> > --
> > *Matthew Casperson*
> > *Senior Front End Developer*
> > Technology, Space & Distribution
> > Auto & General Holdings Pty Ltd
> > P: 07) 3377 8751 (Direct: 3377 8751)
> > F: 07) 3377 8833
> >
> > --
> >
> >
> > 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.
> >
> >
>



-- 
*Matthew Casperson*
*Senior Front End Developer*
Technology, Space & Distribution
Auto & General Holdings Pty Ltd
P: 07) 3377 8751 (Direct: 3377 8751)
F: 07) 3377 8833

-- 


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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-dev/attachments/20150508/f6c8c6b6/attachment-0001.html 


More information about the keycloak-dev mailing list