nacos ERROR Application run failed org.springframework.context.ApplicationContextException: Unable to start web server; nested
时间: 2023-10-18 07:27:01 浏览: 175
Failed to load ApplicationContext
引用:org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is java.lang.NoSuchMethodError: org.apache.tomcat.util.scan.StandardJarScanner.setJarScanFilter(Lorg/apache/tomcat/JarScanFilter;)V 。引用:引入了一个依赖,项目莫名其妙的起不来,尝试了很多办法依然没有解决,只能请教一下公司的大佬,大佬过来看了一眼,真的就看了一眼,把问题解决了,一下子把我给镇住了!!!解决办法:在启动类上加上 exclude = DataSourceAutoConfiguration.class(路径以及命名涉及公司项目,所以打了马赛克)。
根据引用,错误信息显示是由于无法启动嵌入式容器导致的。其中可能的原因是java.lang.NoSuchMethodError: org.apache.tomcat.util.scan.StandardJarScanner.setJarScanFilter(Lorg/apache/tomcat/JarScanFilter;)V。这可能是由于使用了不匹配的Tomcat版本或Tomcat相关的jar包冲突所致。
根据引用,在项目中引入了一个依赖,导致项目启动失败。经过多次尝试仍无法解决,只能请教公司的专家。专家来了之后,只看了一眼就找到了问题,并解决了。解决办法是在启动类上加上exclude = DataSourceAutoConfiguration.class,但由于路径和命名涉及公司项目,所以我打了马赛克。这个解决办法可能是针对数据源自动配置的问题进行了排除,以解决启动失败的问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [org.springframework.context.ApplicationContextException: Unable to start embedded container;...](https://blog.csdn.net/DGH2430284817/article/details/87005822)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [org.springframework.context.ApplicationContextException:Unable to start web server; nested ...](https://blog.csdn.net/java_rumendaofangqi/article/details/121106004)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文