开发者社区> 问答> 正文

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_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)

 

展开
收起
爱吃鱼的程序员 2020-06-06 16:42:08 7549 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB
                        <p>没有配置tomcat?请给出application配置文件和启动类代码。</p>
    
                    
    
                            有配置tomcat的
                        
    
                        <p> </p>
    

    这是application配置文件

    这是启动类

                        <p>druid的servlet中用户名loginUsername设置的null?</p>
    
                    
    
                            感谢!!我设置了的  现在没法重新编辑,只能放评论下面了
                        
    
                        <p>日志提示得很明显了。</p> 
    
    Caused by: java.lang.IllegalArgumentException: Unable to set initialisation parameters for filter due to null name and/or value. Name [loginUsername], Value [null]
                            感谢 !!提示的是空名称,但druid我设置了用户名和密码了的
                        
    
                        <p><img height="560" src="https://static.oschina.net/uploads/space/2018/0719/094111_m40t_3776702.png" width="951"></p>
    

                        <p>error日志这么明显</p>
    
    2020-06-06 16:42:27
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Apache Tomcat 的云原生演进 立即下载
Data-Driven Water Security with Bluemix Apache Spark Service 立即下载
STARTING OUT IN WEB HOSTING 立即下载

相关实验场景

更多