-
Notifications
You must be signed in to change notification settings - Fork 26.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spring boot with dubbo 2.6.3, cause ‘ Cannot initialize context because there is already a root application context present - check whether you have multiple ContextLoader* definitions in your web.xml’ #2535
Comments
这个问题跟DUBBO没关系吧? |
我这个工程spring boot里没有web.xml。 在intellij里启动main可以,发布到tomcat 里启动就报这个。回退到之前一直用的2.6.2就好了。还没来得及进一步分析原因 |
有同样问题,回退到2.6.2就好了,未有任何改动。 |
回退到2.6.2可以 , 2.6.3 tomcat9启动报内存溢出 |
May be the same problem as #2538 |
ApplicationContextHolder implements ApplicationContextAware |
有同样问题,回退到2.6.2就好了,未有任何改动。但是为什么2.6.5就不行 |
dubbo 2.6.3 默认添加了 web-fragment.xml,这个特性基于 servlet 3.0 ,容器会自动扫描这个文件,dubbo-fragment.xml 里面添加一个ContextLoaderListener。Spring Boot 2.0 也基于 Servlet 3.0 添加这个listener,这样就会报错,算是Dubbo的bug。添加一个web.xml 关闭这个特性就好了。 |
Environment
Steps to reproduce this issue
a web spring boot project use dubbo as a consumer,when deploy it to tomcat-7.0.82.4 ,start the applicaton failed, but it start success in IDE without tomcat
Pls. provide [GitHub address] to reproduce this issue.
Expected Result
web project start success
Actual Result
failed
If there is an exception, please attach the exception trace:
The text was updated successfully, but these errors were encountered: