springboot启动报错Unable to start embedded Tomcat

发布于 2022-05-02 19:32:49 字数 4894 浏览 876 评论 9

检查过 jar包没有冲突、端口没有冲突

搞了几个小时了没搞定,求各位大佬指点迷津,报错信息如下

2018-07-18 16:52:33 [org.springframework.boot.StartupInfoLogger:48] INFO  com.wdp.shiro.ShiroAdminApplication - Starting ShiroAdminApplication on DESKTOP-KF0NPFN with PID 1172 (G:eclipse2_prospringboot_shiroshiro_admintargetclasses started by Frank in G:eclipse2_prospringboot_shiroshiro_admin)
2018-07-18 16:52:33 [org.springframework.boot.SpringApplication:593] INFO  com.wdp.shiro.ShiroAdminApplication - No active profile set, falling back to default profiles: default
2018-07-18 16:52:38 [org.springframework.boot.context.embedded.tomcat.TomcatStarter:63] ERROR org.springframework.boot.context.embedded.tomcat.TomcatStarter - Error starting Tomcat context. Exception: java.lang.IllegalArgumentException. Message: Unable to set initialisation parameters for filter due to null name and/or value. Name [loginUsername], Value [null]
2018-07-18 16:52:38 [org.springframework.boot.SpringApplication:771] ERROR org.springframework.boot.SpringApplication - Application startup failed
org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:137)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537)
	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107)
	at com.wdp.shiro.ShiroAdminApplication.main(ShiroAdminApplication.java:16)
Caused by: org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
	at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.initialize(TomcatEmbeddedServletContainer.java:123)
	at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.<init>(TomcatEmbeddedServletContainer.java:84)
	at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getTomcatEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:554)
	at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:179)
	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:164)
	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:134)
	... 8 common frames omitted
Caused by: java.lang.IllegalArgumentException: Unable to set initialisation parameters for filter due to null name and/or value. Name [loginUsername], Value [null]
	at org.apache.catalina.core.ApplicationServletRegistration.setInitParameters(ApplicationServletRegistration.java:109)
	at org.springframework.boot.web.servlet.RegistrationBean.configure(RegistrationBean.java:142)
	at org.springframework.boot.web.servlet.ServletRegistrationBean.configure(ServletRegistrationBean.java:206)
	at org.springframework.boot.web.servlet.ServletRegistrationBean.onStartup(ServletRegistrationBean.java:197)
	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.selfInitialize(EmbeddedWebApplicationContext.java:229)
	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.access$000(EmbeddedWebApplicationContext.java:89)
	at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext$1.onStartup(EmbeddedWebApplicationContext.java:213)
	at org.springframework.boot.context.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:55)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5196)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

 

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(9

岁月染过的梦 2022-05-06 08:44:51

error日志这么明显

邮友 2022-05-06 08:44:44

感谢 !!提示的是空名称,但druid我设置了用户名和密码了的

标点╮ 2022-05-06 08:44:43

日志提示得很明显了。

Caused by: java.lang.IllegalArgumentException: Unable to set initialisation parameters for filter due to null name and/or value. Name [loginUsername], Value [null]
初相遇 2022-05-06 08:44:42

感谢!!我设置了的 现在没法重新编辑,只能放评论下面了

夏日落◇◆ 2022-05-06 08:44:39

druid的servlet中用户名loginUsername设置的null?

请叫√我孤独 2022-05-06 08:44:28

 

这是application配置文件

这是启动类

明媚殇 2022-05-06 08:40:21

有配置tomcat的

柠北森屋 2022-05-03 19:18:59

没有配置tomcat?请给出application配置文件和启动类代码。

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文