[keycloak-user] Spring Boot Adapter: Error creating KeycloakConfigResolver with KC 4.5.0.Final

Pedro Igor Silva psilva at redhat.com
Fri Sep 28 10:49:00 EDT 2018


Can you confirm that you are able to workaround the issue by declaring the
bean creatin in a different class annotated with @Configuration ?

Regards.


On Fri, Sep 28, 2018 at 11:21 AM Niko Köbler <niko at n-k.de> wrote:

> Hi Sebi,
>
> thanks for confirming.
> Ticket is created: https://issues.jboss.org/browse/KEYCLOAK-8444
>
> - Niko
>
>
> Am 28.09.2018 um 16:09 schrieb Sebastien Blanc <sblanc at redhat.com>:
>
> Hi Niko !
>
> Indeed something is wrong here, I can reproduce it. Could you open a
> ticket ? I will take a look at it ASAP.
>
> Sebi
>
> On Fri, Sep 28, 2018 at 3:51 PM Niko Köbler <niko at n-k.de> wrote:
>
>> Hi all,
>>
>> I just updated my Spring Boot w/ Spring Security demo installation to KC
>> 4.5.0.Final.
>> To be able to use the Spring Boot configuration with Spring Security
>> Adapter, I have this bean configuration:
>>
>> @Bean
>> public KeycloakConfigResolver keycloakConfigResolver() {
>>     return new KeycloakSpringBootConfigResolver();
>> }
>>
>> This worked well until 4.4.0.Final.
>> After upgrading to 4.5.0.Final, I get an error when Spring is trying to
>> create the bean registry. Here is the relevant part of the stack trace:
>>
>> Caused by:
>> org.springframework.beans.factory.BeanCurrentlyInCreationException: Error
>> creating bean with name 'keycloakConfigResolver': Requested bean is
>> currently in creation: Is there an unresolvable circular reference?
>>         at
>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.beforeSingletonCreation(DefaultSingletonBeanRegistry.java:339)
>> ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE]
>>         at
>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:215)
>> ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE]
>>         at
>> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
>> ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE]
>>         at
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
>> ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE]
>>         at
>> org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251)
>> ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE]
>>         at
>> org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1135)
>> ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE]
>>         at
>> org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1062)
>> ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE]
>>         at
>> org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:583)
>> ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE]
>>         ... 69 common frames omitted
>>
>>
>> I see, that there was a change in KeycloakSpringBootConfigResolver a few
>> days ago, but I don't really get it... Perhaps it's me, perhaps it's an
>> error?
>> Do I have to define my KeycloakConfigResolver bean in another way?
>>
>> Can anybody help me?
>>
>> Regards,
>> - Niko
>>
>>
>> _______________________________________________
>> keycloak-user mailing list
>> keycloak-user at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/keycloak-user
>>
>
>


More information about the keycloak-user mailing list