Home > Enterprise >  Factory method 'jwtAccessTokenConverter' threw exception; nested exception is java.lang.Il
Factory method 'jwtAccessTokenConverter' threw exception; nested exception is java.lang.Il

Time:11-20

It's an error that comes out during spring build. I changed the difference from the existing source code to mariaDB -> mysqlDB. I wonder why this error is coming out.

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerEndpointsConfiguration': Invocation of init method failed; nested exception is java.lang.IllegalStateException: Cannot configure enpdoints
  
Caused by: java.lang.IllegalStateException: Cannot configure enpdoints
  
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tokenStore' defined in class path resource [me/sun/springbootstudy/config/oauth/AuthorizationServer.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 [me/sun/springbootstudy/config/oauth/AuthorizationServer.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.IllegalArgumentException: [Assertion failed] - this String argument must have text; it must not be null, empty, or blank
 
Caused by: 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 [me/sun/springbootstudy/config/oauth/AuthorizationServer.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.IllegalArgumentException: [Assertion failed] - this String argument must have text; it must not be null, empty, or blank
    
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jwtAccessTokenConverter' defined in class path resource [me/sun/springbootstudy/config/oauth/AuthorizationServer.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.IllegalArgumentException: [Assertion failed] - this String argument must have text; it must not be null, empty, or blank
  
Caused by: 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.IllegalArgumentException: [Assertion failed] - this String argument must have text; it must not be null, empty, or blank
 
Caused by: java.lang.IllegalArgumentException: [Assertion failed] - this String argument must have text; it must not be null, empty, or blank

CodePudding user response:

I translate your question into two part.

BeanInstantiationException

This exception thrown when instantiation of a bean failed. Carries the offending bean class. more specifically IOC experienced error on creating bean with name 'jwtAccessTokenConverter' defined in class path resource [.../springbootstudy/config/oauth/AuthorizationServer.class.

JwtAccessTokenConverter

It translates between JWT encoded token values and OAuth authentication information (in both directions). Also acts as a TokenEnhancer when tokens are granted.Furthermore log translator suggest that string argument (please read the field sumery) with in jwtAccessTokenConverter must have text; it must not be null, empty, or blank. this may cause by miss configuration but more debugging details required for this.

  • Related