BladeX会员版AuthApplication启动报错

Blade 已结 2 743
bfwking
bfwking 剑圣 2022-03-08 10:10

一、该问题的重现步骤是什么?

  1. 使用eclipse会员版导入BladeX、BladeXTool

image.png

2. nacos、redis、mysql均已初始化好


3. 启动AuthApplication


二、你期待的结果是什么?实际看到的又是什么?

期待正常启动,实际报错


三、你正在使用的是什么产品,什么版本?在什么操作系统上?

BladeX会员版,Cloud版本,windows11系统

四、请提供详细的错误堆栈信息,这很重要。

----启动中,读取到的环境变量:[dev],jar地址:[/C:/workspace-kaiyuan/BladeX/blade-auth/target/classes/]----

                   ______  _             _       ___   ___

                   | ___ \| |           | |      \  \ /  /

                   | |_/ /| |  __ _   __| |  ___  \  V  /

                   | ___ \| | / _` | / _` | / _ \   > <

                   | |_/ /| || (_| || (_| ||  __/ /  .  \

                   \____/ |_| \__,_| \__,_| \___|/__/ \__\


:: BladeX 2.9.0.RELEASE :: blade-auth:dev :: Running SpringBoot 2.3.12.RELEASE :: 


2022-03-08 09:54:26.643  INFO 201232 --- [           main] org.reflections.Reflections              : Reflections took 81 ms to scan 1 urls, producing 3 keys and 6 values 

2022-03-08 09:54:26.696  INFO 201232 --- [           main] org.reflections.Reflections              : Reflections took 17 ms to scan 1 urls, producing 4 keys and 9 values 

2022-03-08 09:54:26.714  INFO 201232 --- [           main] org.reflections.Reflections              : Reflections took 12 ms to scan 1 urls, producing 3 keys and 10 values 

2022-03-08 09:54:27.006  INFO 201232 --- [           main] org.reflections.Reflections              : Reflections took 285 ms to scan 280 urls, producing 0 keys and 0 values 

2022-03-08 09:54:27.016  INFO 201232 --- [           main] org.reflections.Reflections              : Reflections took 7 ms to scan 1 urls, producing 1 keys and 5 values 

2022-03-08 09:54:27.030  INFO 201232 --- [           main] org.reflections.Reflections              : Reflections took 7 ms to scan 1 urls, producing 1 keys and 7 values 

2022-03-08 09:54:27.043  INFO 201232 --- [           main] org.reflections.Reflections              : Reflections took 7 ms to scan 1 urls, producing 2 keys and 8 values 

2022-03-08 09:54:27.283  INFO 201232 --- [           main] org.reflections.Reflections              : Reflections took 233 ms to scan 280 urls, producing 0 keys and 0 values 

2022-03-08 09:54:29.826  WARN 201232 --- [           main] c.a.c.n.c.NacosPropertySourceBuilder     : Ignore the empty nacos configuration and get it based on dataId[blade-auth] & group[DEFAULT_GROUP]

2022-03-08 09:54:29.831  WARN 201232 --- [           main] c.a.c.n.c.NacosPropertySourceBuilder     : Ignore the empty nacos configuration and get it based on dataId[blade-auth.yaml] & group[DEFAULT_GROUP]

2022-03-08 09:54:29.836  WARN 201232 --- [           main] c.a.c.n.c.NacosPropertySourceBuilder     : Ignore the empty nacos configuration and get it based on dataId[blade-auth-dev.yaml] & group[DEFAULT_GROUP]

2022-03-08 09:54:29.838  INFO 201232 --- [           main] b.c.PropertySourceBootstrapConfiguration : Located property source: [BootstrapPropertySource {name='bootstrapProperties-blade-auth-dev.yaml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-blade-auth.yaml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-blade-auth,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-blade-dev.yaml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-blade.yaml,DEFAULT_GROUP'}]

2022-03-08 09:54:29.846  INFO 201232 --- [           main] org.springblade.auth.AuthApplication     : The following profiles are active: dev

2022-03-08 09:54:30.092  WARN 201232 --- [           main] o.s.c.c.u.SpringFactoryImportSelector    : More than one implementation of @EnableCircuitBreaker (now relying on @Conditionals to pick one): [org.springframework.cloud.netflix.hystrix.HystrixCircuitBreakerConfiguration, com.alibaba.cloud.sentinel.custom.SentinelCircuitBreakerConfiguration]

2022-03-08 09:54:32.877  INFO 201232 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!

2022-03-08 09:54:32.891  INFO 201232 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode.

2022-03-08 09:54:32.978  INFO 201232 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 42ms. Found 0 Redis repository interfaces.

2022-03-08 09:54:33.148  WARN 201232 --- [           main] o.s.boot.actuate.endpoint.EndpointId     : Endpoint ID 'service-registry' contains invalid characters, please migrate to a valid format.

2022-03-08 09:54:33.177  WARN 201232 --- [           main] o.s.boot.actuate.endpoint.EndpointId     : Endpoint ID 'hystrix.stream' contains invalid characters, please migrate to a valid format.

2022-03-08 09:54:33.427  WARN 201232 --- [           main] o.m.s.mapper.ClassPathMapperScanner      : No MyBatis mapper was found in '[org.springblade.auth]' package. Please check your configuration.

2022-03-08 09:54:33.721  INFO 201232 --- [           main] o.s.cloud.context.scope.GenericScope     : BeanFactory id=39bb8650-79e9-39ec-81e7-8865ce11407d

2022-03-08 09:54:35.157  INFO 201232 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'spring.cloud.sentinel-com.alibaba.cloud.sentinel.SentinelProperties' of type [com.alibaba.cloud.sentinel.SentinelProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

INFO: Sentinel log output type is: file

INFO: Sentinel log charset is: utf-8

INFO: Sentinel log base directory is: C:\Users\54476\logs\csp\

INFO: Sentinel log name use pid is: false

2022-03-08 09:54:35.460  INFO 201232 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'com.alibaba.cloud.sentinel.custom.SentinelAutoConfiguration' of type [com.alibaba.cloud.sentinel.custom.SentinelAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2022-03-08 09:54:35.895  WARN 201232 --- [           main] io.undertow.websockets.jsr               : UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used

2022-03-08 09:54:35.963  INFO 201232 --- [           main] io.undertow.servlet                      : Initializing Spring embedded WebApplicationContext

2022-03-08 09:54:35.963  INFO 201232 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 6074 ms

2022-03-08 09:54:36.189  WARN 201232 --- [           main] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.

2022-03-08 09:54:36.189  INFO 201232 --- [           main] c.n.c.sources.URLConfigurationSource     : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.

2022-03-08 09:54:36.220  INFO 201232 --- [           main] c.netflix.config.DynamicPropertyFactory  : DynamicPropertyFactory is initialized with configuration sources: com.netflix.config.ConcurrentCompositeConfiguration@7bdb4f17

2022-03-08 09:54:36.426  INFO 201232 --- [           main] o.s.b.a.e.web.ServletEndpointRegistrar   : Registered '/actuator/hystrix.stream' to hystrix.stream-actuator-endpoint

2022-03-08 09:54:36.602  INFO 201232 --- [           main] c.a.d.s.b.a.DruidDataSourceAutoConfigure : Init DruidDataSource

2022-03-08 09:54:37.069  INFO 201232 --- [           main] com.alibaba.druid.pool.DruidDataSource   : {dataSource-1} inited

2022-03-08 09:54:37.561  INFO 201232 --- [           main] o.s.c.openfeign.FeignClientFactoryBean   : For 'blade-user' URL not provided. Will try picking an instance via load-balancing.

2022-03-08 09:54:38.124  INFO 201232 --- [           main] o.s.c.openfeign.FeignClientFactoryBean   : For 'blade-system' URL not provided. Will try picking an instance via load-balancing.

2022-03-08 09:54:38.179  WARN 201232 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'bladeAuthorizationServerConfiguration' defined in file [C:\workspace-kaiyuan\BladeX\blade-auth\target\classes\org\springblade\auth\config\BladeAuthorizationServerConfiguration.class]: Unsatisfied dependency expressed through constructor parameter 2; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'bladeUserDetailsServiceImpl' defined in file [C:\workspace-kaiyuan\BladeX\blade-auth\target\classes\org\springblade\auth\service\BladeUserDetailsServiceImpl.class]: Unsatisfied dependency expressed through constructor parameter 2; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springblade.core.redis.cache.BladeRedis' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}

2022-03-08 09:54:38.182  INFO 201232 --- [           main] com.alibaba.druid.pool.DruidDataSource   : {dataSource-1} closing ...

2022-03-08 09:54:38.185  INFO 201232 --- [           main] com.alibaba.druid.pool.DruidDataSource   : {dataSource-1} closed

2022-03-08 09:54:38.198  INFO 201232 --- [           main] ConditionEvaluationReportLoggingListener : 


Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.

2022-03-08 09:54:38.262 ERROR 201232 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 


***************************

APPLICATION FAILED TO START

***************************


Description:


Parameter 2 of constructor in org.springblade.auth.service.BladeUserDetailsServiceImpl required a bean of type 'org.springblade.core.redis.cache.BladeRedis' that could not be found.



Action:


Consider defining a bean of type 'org.springblade.core.redis.cache.BladeRedis' in your configuration.

五、若有更多详细信息,请在下面提供。

2条回答
  •  admin
    admin (最佳回答者)
    2022-03-09 22:27

    不要把bladex-tool工程引入到bladex工程内,如果需要修改,可以给他单独开一个窗口,修改完毕之后执行mvn clean install安装到本地,或者执行deploy推送到公司的nexus私服,这样本地化适配就没问题了。

    0 讨论(1)
  • 2022-03-08 10:12

    不引入BladeX-Tool工程则可以正常启动,但项目需要修改改该工程,做本地化适配

    0 讨论(0)
提交回复