org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfiguration': Unsatisfied dependency expressed through field 'tokenStore'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tokenStore' defined in class path resource [com/shunneng/gateway/config/MicroserviceSecurityConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.provider.token.TokenStore]: Factory method 'tokenStore' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jwtAccessTokenConverter' defined in class path resource [com/shunneng/gateway/config/MicroserviceSecurityConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter]: Factory method 'jwtAccessTokenConverter' threw exception; nested exception is java.lang.IllegalStateException: No instances available for uaa

GitHub | anjia0532 | 5 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    GitHub comment 4283#252415769

    GitHub | 5 months ago | anjia0532
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfiguration': Unsatisfied dependency expressed through field 'tokenStore'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tokenStore' defined in class path resource [com/shunneng/gateway/config/MicroserviceSecurityConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.provider.token.TokenStore]: Factory method 'tokenStore' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jwtAccessTokenConverter' defined in class path resource [com/shunneng/gateway/config/MicroserviceSecurityConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter]: Factory method 'jwtAccessTokenConverter' threw exception; nested exception is java.lang.IllegalStateException: No instances available for uaa
  2. 0

    EurekaClient Bean initialization timing error

    GitHub | 9 months ago | sunnykaka
    java.lang.IllegalStateException: No instances available for ACCOUNT
  3. 0

    @LoadBalanced RestTemplate to call nested context endpoints

    Stack Overflow | 6 months ago | nmadzharov
    java.lang.IllegalStateException: No instances available for say-hello
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalStateException

      No instances available for uaa

      at org.springframework.cloud.netflix.ribbon.RibbonLoadBalancerClient.execute()
    2. org.springframework.cloud
      LoadBalancerInterceptor.intercept
      1. org.springframework.cloud.netflix.ribbon.RibbonLoadBalancerClient.execute(RibbonLoadBalancerClient.java:79)
      2. org.springframework.cloud.client.loadbalancer.LoadBalancerInterceptor.intercept(LoadBalancerInterceptor.java:46)
      2 frames
    3. Spring
      RestTemplate$$FastClassBySpringCGLIB$$aa4e9ed0.invoke
      1. org.springframework.http.client.InterceptingClientHttpRequest$InterceptingRequestExecution.execute(InterceptingClientHttpRequest.java:85)
      2. org.springframework.http.client.InterceptingClientHttpRequest.executeInternal(InterceptingClientHttpRequest.java:69)
      3. org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48)
      4. org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:53)
      5. org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:619)
      6. org.springframework.web.client.RestTemplate.execute(RestTemplate.java:580)
      7. org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:498)
      8. org.springframework.web.client.RestTemplate$$FastClassBySpringCGLIB$$aa4e9ed0.invoke(<generated>)
      8 frames
    4. Spring Core
      MethodProxy.invoke
      1. org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
      1 frame
    5. Spring AOP
      MethodInvocationProceedingJoinPoint.proceed
      1. org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:720)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
      3. org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85)
      3 frames
    6. org.springframework.cloud
      RestTemplateUrlTemplateCapturingAspect.captureUrlTemplate
      1. org.springframework.cloud.netflix.metrics.RestTemplateUrlTemplateCapturingAspect.captureUrlTemplate(RestTemplateUrlTemplateCapturingAspect.java:33)
      1 frame
    7. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:498)
      4 frames
    8. Spring AOP
      CglibAopProxy$DynamicAdvisedInterceptor.intercept
      1. org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:629)
      2. org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:618)
      3. org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
      4. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      5. org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
      6. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      7. org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:655)
      7 frames
    9. Spring
      RestTemplate$$EnhancerBySpringCGLIB$$6b99c23.exchange
      1. org.springframework.web.client.RestTemplate$$EnhancerBySpringCGLIB$$6b99c23.exchange(<generated>)
      1 frame
    10. com.shunneng.gateway
      MicroserviceSecurityConfiguration$$EnhancerBySpringCGLIB$$34cf6ee6$$FastClassBySpringCGLIB$$e20e677.invoke
      1. com.shunneng.gateway.config.MicroserviceSecurityConfiguration.getKeyFromAuthorizationServer(MicroserviceSecurityConfiguration.java:85)
      2. com.shunneng.gateway.config.MicroserviceSecurityConfiguration.jwtAccessTokenConverter(MicroserviceSecurityConfiguration.java:65)
      3. com.shunneng.gateway.config.MicroserviceSecurityConfiguration$$EnhancerBySpringCGLIB$$34cf6ee6.CGLIB$jwtAccessTokenConverter$2(<generated>)
      4. com.shunneng.gateway.config.MicroserviceSecurityConfiguration$$EnhancerBySpringCGLIB$$34cf6ee6$$FastClassBySpringCGLIB$$e20e677.invoke(<generated>)
      4 frames
    11. Spring Core
      MethodProxy.invokeSuper
      1. org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
      1 frame
    12. Spring Context
      ConfigurationClassEnhancer$BeanMethodInterceptor.intercept
      1. org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356)
      1 frame
    13. com.shunneng.gateway
      MicroserviceSecurityConfiguration$$EnhancerBySpringCGLIB$$34cf6ee6.jwtAccessTokenConverter
      1. com.shunneng.gateway.config.MicroserviceSecurityConfiguration$$EnhancerBySpringCGLIB$$34cf6ee6.jwtAccessTokenConverter(<generated>)
      1 frame
    14. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:498)
      4 frames
    15. Spring Beans
      AbstractBeanFactory.getBean
      1. org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
      2. org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
      3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1128)
      4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1023)
      5. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
      6. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
      7. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
      8. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
      9. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
      10. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
      10 frames
    16. Spring Context
      ConfigurationClassEnhancer$BeanMethodInterceptor.intercept
      1. org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:381)
      1 frame
    17. com.shunneng.gateway
      MicroserviceSecurityConfiguration$$EnhancerBySpringCGLIB$$34cf6ee6$$FastClassBySpringCGLIB$$e20e677.invoke
      1. com.shunneng.gateway.config.MicroserviceSecurityConfiguration$$EnhancerBySpringCGLIB$$34cf6ee6.jwtAccessTokenConverter(<generated>)
      2. com.shunneng.gateway.config.MicroserviceSecurityConfiguration.tokenStore(MicroserviceSecurityConfiguration.java:59)
      3. com.shunneng.gateway.config.MicroserviceSecurityConfiguration$$EnhancerBySpringCGLIB$$34cf6ee6.CGLIB$tokenStore$1(<generated>)
      4. com.shunneng.gateway.config.MicroserviceSecurityConfiguration$$EnhancerBySpringCGLIB$$34cf6ee6$$FastClassBySpringCGLIB$$e20e677.invoke(<generated>)
      4 frames
    18. Spring Core
      MethodProxy.invokeSuper
      1. org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
      1 frame
    19. Spring Context
      ConfigurationClassEnhancer$BeanMethodInterceptor.intercept
      1. org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356)
      1 frame
    20. com.shunneng.gateway
      MicroserviceSecurityConfiguration$$EnhancerBySpringCGLIB$$34cf6ee6.tokenStore
      1. com.shunneng.gateway.config.MicroserviceSecurityConfiguration$$EnhancerBySpringCGLIB$$34cf6ee6.tokenStore(<generated>)
      1 frame
    21. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:498)
      4 frames
    22. Spring Beans
      DefaultListableBeanFactory.preInstantiateSingletons
      1. org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
      2. org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
      3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1128)
      4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1023)
      5. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
      6. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
      7. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
      8. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
      9. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
      10. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
      11. org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:207)
      12. org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1128)
      13. org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1056)
      14. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:566)
      15. org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
      16. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:349)
      17. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1219)
      18. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
      19. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
      20. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
      21. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
      22. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
      23. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
      24. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:751)
      24 frames
    23. Spring Context
      AbstractApplicationContext.refresh
      1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861)
      2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)
      2 frames
    24. Spring Boot
      SpringApplication.run
      1. org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
      2. org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761)
      3. org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371)
      4. org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
      4 frames
    25. com.shunneng.gateway
      GatewayApp.main
      1. com.shunneng.gateway.GatewayApp.main(GatewayApp.java:69)
      1 frame
    26. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:498)
      4 frames
    27. org.springframework.boot
      RestartLauncher.run
      1. org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
      1 frame