Caused by: java.lang.ClassCastException: org.springframework.web.SpringServletContainerInitializer cannot be cast to javax.servlet.ServletContainerInitializer。。。。。检查一下servlet-api是否冲突了?
原因:jar包发生冲突。在我的pom.xml文件中
<dependency>  
    <groupId>javax.servlet</groupId>  
    <artifactId>javax.servlet-api</artifactId>  
    <version>3.1.0</version>  
</dependency>
当程序运行时与tomcat中的jar包冲突了,只需要它在测试、编译阶段有用
可以限制作用范围,改成如下
<dependency>  
    <groupId>javax.servlet</groupId>  
    <artifactId>javax.servlet-api</artifactId>  
    <scope>provided</scope>  
    <version>3.1.0</version>  
</dependency>
Caused by: java.lang.ClassCastException: org.springframework.web.SpringServletContainerInitializer cannot be cast to javax.servlet.ServletContainerInitializer。。。。。检查一下servlet-api是否冲突了?的更多相关文章
- Caused by: java.lang.ClassCastException: org.springframework.web.SpringServletContainerInitializer cannot be cast to javax.servlet.ServletContainerInitializer错误解决办法
		
严重: Failed to initialize end point associated with ProtocolHandler ["http-bio-8080"] java. ...
 - Caused by: java.lang.ClassCastException: org.springframework.web.SpringServletContainerInitializer cannot be cast to javax.servlet.ServletContainerInitializer
		
A child container failed during startjava.util.concurrent.ExecutionException: org.apache.catalina.Li ...
 - java.lang.ClassCastException: org.springframework.web.filter.CharacterEncodingFilter cannot be cast to javax.servlet.Filter
		
java.lang.ClassCastException: org.springframework.web.filter.CharacterEncodingFilter cannot be cast ...
 - Caused by: java.lang.NoClassDefFoundError: org/springframework/web/context/WebApplicationContext
		
1.错误描述 严重: A child container failed during start java.util.concurrent.ExecutionException: org.apache ...
 - Caused by: java.lang.ClassNotFoundException: org.springframework.web.filter.FormContentFilter
		
又是一个报错,我写代码真的是可以,所有的bug都会被我遇到,所有的问题我都能踩一遍,以前上学的时候同学就喜欢问我问题,因为他们遇到的问题,我早就遇到了......... 看看报错内容: 2019-04 ...
 - java.lang.ClassCastException: org.springframework.web.filter.CharacterEncodingFilter cannot be cast
		
严重: Exception starting filter encodingFilterjava.lang.ClassCastException: org.springframework.web.fi ...
 - Caused by: java.lang.ClassNotFoundException: org.springframework.web.socket.server.standard.ServerEndpointExporter
		
Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/web/socket/ ...
 - 异常:Caused by: java.lang.NoClassDefFoundError: org/springframework/web/context/WebApplicationContext
		
说明项目没有加载jar包 异常:Caused by: java.lang.NoClassDefFoundError: org/springframework/web/context/WebApplic ...
 - WebLogic部署报java.lang.ClassCastException: weblogic.xml.jaxp.RegistrySAXParserFactory cannot be cast to javax.xml.parsers.SAXParserFactory
		
今天在部署WebLogic项目时,报了java.lang.ClassCastException: weblogic.xml.jaxp.RegistrySAXParserFactory cannot b ...
 
随机推荐
- 读《TCP/IP详解》:TCP
			
TCP(Transmission Control Protocol,传输控制协议),位于传输层,提供一种面向连接.可靠的字节流服务. 字节流服务(Byte Stream Service)是指,为了方便 ...
 - AssetBundleMaster_ReadMe_EN
			
Before we start use it, you'd better import it to an empty project, following the ReadMe to learn th ...
 - Rust中的测试用例的写法
			
有点类似 #[derive(Debug)] pub struct Rectangle { length: u32, width: u32, } impl Rectangle { pub fn can_ ...
 - 201871010101-陈来弟《面向对象程序设计(JAVA)》 第14周学习总结
			
实验十二 Swing图形界面组件(一) 实验时间 2019-11-29 第一部分:基础知识 Swing和MVC设计模式 (1)设计模式(Design pattern)是设计者一种流行的 思考设计问题 ...
 - 201871010104-陈园园 《面向对象程序设计(java)》第十四周学习总结
			
201871010104-陈园园 <面向对象程序设计(java)>第十四周学习总结 项目 内容 这个作业属于哪个课程 https://www.cnblogs.com/nwnu-daizh/ ...
 - Shell 脚本中 '$' 符号的多种用法
			
通常情况下,在工作中用的最多的有如下几项: $0:Shell 的命令本身 $1 到 $9:表示 Shell 的第几个参数 $? :显示最后命令的执行情况 $#:传递到脚本的参数个数 $$:脚本运行的当 ...
 - Dubbo支持的协议(四)
			
1. Dubbo Dubbo 官方推荐的协议 本质:使用 NIO 和线程池进行处理 缺点:大文件传输时可能出现文件传输失败问题. 2. RMI JDK 提供的协议,远程方法调用协议 缺点:偶尔连接失败 ...
 - BIO/NIO/AIO的区分(十四)
			
BIO:同步阻塞IO(平常说的IO指的是BIO)NIO:同步非阻塞IOAIO:异步非阻塞IO io操作分为两部分,发起io请求,和io数据读写. 阻塞.非阻塞主要是针对线程发起io请求后,是否立即返回 ...
 - oracle  sql语言模糊查询
			
'^' 匹配输入字符串的开始位置,在方括号表达式中使用,此时它表示不接受该字符集合.'$' 匹配输入字符串的结尾位置.如果设置了 RegExp 对象的 Multiline 属性,则 $ 也匹配 '\n ...
 - java实体 和 xml相互转换
			
参考: https://blog.csdn.net/LookForDream_/article/details/88884316 https://zhuchengzzcc.iteye.com/blog ...