blade-admin启动报WebMvcConfigurer.class cannot be opened,已尝试排除spring-web但依然报错

Blade 未结 1 2650
gzpj
gzpj 剑圣 2021-08-11 20:23

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

1. 用idea启动blade-admin


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

可正常启动。

启动异常class path resource [org/springframework/web/servlet/config/annotation/WebMvcConfigurer.class] cannot be opened because it does not exist


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

使用bladex,2.8.1,macos

从2.7.1至2.8.1版本均报错,2.7.0版本正常


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


----启动中,读取到的环境变量:[dev],jar地址:[/Users/zhanglibo/work/git/BladeX-master/blade-ops/blade-admin/target/classes/]----

2021-08-11 20:04:00.736  INFO 43983 --- [kground-preinit] o.h.validator.internal.util.Version      : HV000001: Hibernate Validator 6.0.22.Final

  .   ____          _            __ _ _

 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \

( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \

 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )

  '  |____| .__|_| |_|_| |_\__, | / / / /

 =========|_|==============|___/=/_/_/_/

 :: Spring Boot ::       (v2.2.13.RELEASE)

2021-08-11 20:04:01.542  INFO 43983 --- [           main] org.reflections.Reflections              : Reflections took 58 ms to scan 1 urls, producing 3 keys and 6 values 

2021-08-11 20:04:01.590  INFO 43983 --- [           main] org.reflections.Reflections              : Reflections took 28 ms to scan 1 urls, producing 4 keys and 9 values 

2021-08-11 20:04:01.615  INFO 43983 --- [           main] org.reflections.Reflections              : Reflections took 23 ms to scan 1 urls, producing 3 keys and 10 values 

2021-08-11 20:04:01.837  INFO 43983 --- [           main] org.reflections.Reflections              : Reflections took 219 ms to scan 316 urls, producing 0 keys and 0 values 

2021-08-11 20:04:01.848  INFO 43983 --- [           main] org.reflections.Reflections              : Reflections took 10 ms to scan 1 urls, producing 1 keys and 5 values 

2021-08-11 20:04:01.864  INFO 43983 --- [           main] org.reflections.Reflections              : Reflections took 12 ms to scan 1 urls, producing 1 keys and 7 values 

2021-08-11 20:04:01.876  INFO 43983 --- [           main] org.reflections.Reflections              : Reflections took 8 ms to scan 1 urls, producing 2 keys and 8 values 

2021-08-11 20:04:01.994  INFO 43983 --- [           main] org.reflections.Reflections              : Reflections took 116 ms to scan 316 urls, producing 0 keys and 0 values 

2021-08-11 20:04:03.071  WARN 43983 --- [           main] c.a.c.n.c.NacosPropertySourceBuilder     : Ignore the empty nacos configuration and get it based on dataId[blade-admin] & group[DEFAULT_GROUP]

2021-08-11 20:04:03.084  WARN 43983 --- [           main] c.a.c.n.c.NacosPropertySourceBuilder     : Ignore the empty nacos configuration and get it based on dataId[blade-admin.yaml] & group[DEFAULT_GROUP]

2021-08-11 20:04:03.095  WARN 43983 --- [           main] c.a.c.n.c.NacosPropertySourceBuilder     : Ignore the empty nacos configuration and get it based on dataId[blade-admin-dev.yaml] & group[DEFAULT_GROUP]

2021-08-11 20:04:03.096  INFO 43983 --- [           main] b.c.PropertySourceBootstrapConfiguration : Located property source: [BootstrapPropertySource {name='bootstrapProperties-blade-admin-dev.yaml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-blade-admin.yaml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-blade-admin,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-blade-dev.yaml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-blade.yaml,DEFAULT_GROUP'}]

2021-08-11 20:04:03.120  INFO 43983 --- [           main] org.springblade.admin.AdminApplication   : The following profiles are active: dev

2021-08-11 20:04:03.189  WARN 43983 --- [           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]

2021-08-11 20:04:03.565  WARN 43983 --- [           main] onfigReactiveWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [org.springblade.admin.AdminApplication]; nested exception is java.io.FileNotFoundException: class path resource [org/springframework/web/servlet/config/annotation/WebMvcConfigurer.class] cannot be opened because it does not exist

2021-08-11 20:04:03.574  INFO 43983 --- [           main] ConditionEvaluationReportLoggingListener : 

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

2021-08-11 20:04:03.578 ERROR 43983 --- [           main] o.s.boot.SpringApplication               : Application run failed

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [org.springblade.admin.AdminApplication]; nested exception is java.io.FileNotFoundException: class path resource [org/springframework/web/servlet/config/annotation/WebMvcConfigurer.class] cannot be opened because it does not exist

at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:610)

at org.springframework.context.annotation.ConfigurationClassParser.access$800(ConfigurationClassParser.java:111)

at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorGroupingHandler.lambda$processGroupImports$1(ConfigurationClassParser.java:812)

at java.util.ArrayList.forEach(ArrayList.java:1257)

at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorGroupingHandler.processGroupImports(ConfigurationClassParser.java:809)

at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorHandler.process(ConfigurationClassParser.java:780)

at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:193)

at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:319)

at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:236)

at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:280)

at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:96)

at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:707)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:533)

at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:66)

at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)

at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:405)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)

at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:140)

at org.springblade.core.launch.BladeApplication.run(BladeApplication.java:50)

at org.springblade.admin.AdminApplication.main(AdminApplication.java:34)

Caused by: java.io.FileNotFoundException: class path resource [org/springframework/web/servlet/config/annotation/WebMvcConfigurer.class] cannot be opened because it does not exist

at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:180)

at org.springframework.core.type.classreading.SimpleMetadataReader.getClassReader(SimpleMetadataReader.java:55)

at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:49)

at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:103)

at org.springframework.boot.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory.createMetadataReader(ConcurrentReferenceCachingMetadataReaderFactory.java:86)

at org.springframework.boot.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory.getMetadataReader(ConcurrentReferenceCachingMetadataReaderFactory.java:73)

at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:81)

at org.springframework.context.annotation.ConfigurationClassParser.asSourceClass(ConfigurationClassParser.java:696)

at org.springframework.context.annotation.ConfigurationClassParser$SourceClass.getInterfaces(ConfigurationClassParser.java:1024)

at org.springframework.context.annotation.ConfigurationClassParser.processInterfaces(ConfigurationClassParser.java:386)

at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:332)

at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:250)

at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:600)

... 19 common frames omitted

Process finished with exit code 1


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

已尝试排除spring-web但依然报错,2.7.0版本启动正常,2.7.1至2.8.1版本均报错

1条回答
  • 2021-08-11 23:32

    这是2.8.1版本的启动日志,可以正常启动。你下载git私服原版,然后导入工程再执行mvn clean install、mvn clean complie再启动试试,感觉是新版本更新后,jar包没有下载成功,才导致报找不到类的错误

    image.png

    0 讨论(0)
提交回复