springboot启动报错Unable to start embedded Tomcat
检查过 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(9)
error日志这么明显
感谢 !!提示的是空名称,但druid我设置了用户名和密码了的
日志提示得很明显了。
感谢!!我设置了的 现在没法重新编辑,只能放评论下面了
druid的servlet中用户名loginUsername设置的null?
这是application配置文件
这是启动类
有配置tomcat的
没有配置tomcat?请给出application配置文件和启动类代码。