springboot启动报错Unable to start embedded Tomcat

果味衬衫 发布于 2018/07/18 17:01
阅读 79K+
收藏 0

如何使用英特尔®oneAPI工具实现PyTorch 优化,直播火热报名中>>>

检查过 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_pro\springboot_shiro\shiro_admin\target\classes started by Frank in G:\eclipse2_pro\springboot_shiro\shiro_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)

 

加载中
0
xiaour
xiaour

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

果味衬衫
果味衬衫
有配置tomcat的
0
果味衬衫
果味衬衫

 

这是application配置文件

这是启动类

0
TinyY
TinyY

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

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

日志提示得很明显了。

Caused by: java.lang.IllegalArgumentException: Unable to set initialisation parameters for filter due to null name and/or value. Name [loginUsername], Value [null]
果味衬衫
果味衬衫
感谢 !!提示的是空名称,但druid我设置了用户名和密码了的
0
爱吃瓜的杨师傅
爱吃瓜的杨师傅

error日志这么明显

0
osc_12175925
osc_12175925
该评论暂时无法显示,详情咨询 QQ 群:点此入群
0
osc_12175925
osc_12175925
该评论暂时无法显示,详情咨询 QQ 群:点此入群
OSCHINA
登录后可查看更多优质内容
返回顶部
顶部