看网上说法tomcat启动时会把lib目录下的jar包加载进内存,而项目里也有相同的jar包就会导致jar包冲突

解决办法;

  把pom依赖里相应的jar包添加<scope>标签

    <dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>3.0-alpha-1</version>
<scope>provided</scope>
</dependency>

scope标签值选择provided表示项目部署时不会把这个jar包包含进去

Maven项目启动报错:org.springframework.web.filter.CharacterEncodingFilter cannot be cast to javax.servlet.Filter的更多相关文章

  1. 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 ...

  2. eclipse 中导入 maven项目 启动报错

    导入Maven项目到Eclipse中时,出现问题如下: java.lang.ClassNotFoundException: org.springframework.web.context.Contex ...

  3. Tomcat启动报错org.springframework.web.context.ContextLoaderListener类配置错误——SHH框架

    SHH框架工程,Tomcat启动报错org.springframework.web.context.ContextLoaderListener类配置错误 1.查看配置文件web.xml中是否配置.or ...

  4. maven项目启动报错:SLF4J: Class path contains multiple SLF4J bindings.

    SringBoot的Application启动报错: SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding ...

  5. maven项目启动报错;class path resource [com/ssm/mapping/] cannot be resolved to URL because it does not exist

    项目启动报了一堆错误,其实都是class path resource [com/ssm/mapping/] cannot be resolved to URL because it does not ...

  6. Maven项目启动报错

    错误信息如下: 六月 , :: 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin 警告: [SetPropertiesRule]{S ...

  7. 启动Maven项目启动报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

    tomcat在发布项目的时候没有同时发布maven依赖所添加的jar包,你需要设置一下eclipse:项目 -> 属性 -> Deployment Assembly -> Add - ...

  8. maven项目 启动报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

    tomcat在发布项目的时候没有同时发布maven依赖所添加的jar包,所以找不到解决方法:设置一下eclipse:项目 -> properties -> Deployment Assem ...

  9. Maven项目启动报错:java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

    1.场景 1.1.先确认pom.xml文件已添加mysql依赖: <dependency>    <groupId>mysql</groupId>     < ...

随机推荐

  1. php5.6+Redis+Windows7安装 (phpstudy)

    Windows下为PHP安装redis扩展 1.使用phpinfo()函数查看PHP的版本信息,这会决定扩展文件版本. 2.下载php_igbinary-2.0.1-7.0-ts-vc14-x64.z ...

  2. VS中属性配置ABC

    1.包含目录和附加包含目录(库目录和附加库目录)的区别: 包含目录:修改了系统的include宏的值,是全局的: 附加包含目录:用于当前项目,对其他项目没有影响. (库目录和附加库目录的区别同上) 2 ...

  3. 实习培训——Java异常处理(8)

    实习培训——Java异常处理(8) Java 异常处理 异常是程序中的一些错误,但并不是所有的错误都是异常,并且错误有时候是可以避免的. 比如说,你的代码少了一个分号,那么运行出来结果是提示是错误 j ...

  4. 不同平台windows、linux、mac 上换行符的问题

    http://blog.chinaunix.net/uid-26748613-id-3179595.html?page=2 https://blog.csdn.net/changruihe/artic ...

  5. ERROR [main] zookeeper.RecoverableZooKeeper: ZooKeeper create failed after 4 attempts

    ERROR [main] zookeeper.RecoverableZooKeeper: ZooKeeper create failed after 4 attempts ERROR [main] m ...

  6. 带下拉列表的TextBox

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  7. InterProScan 5.25-64.0 安装和使用

    InterProScan 5.25-64.0 安装和使用,目前最新版的interproscan 引用自 每日一生信--interproscan安装及使用(终结版)原文官网:http://code.go ...

  8. python字典对与list对象组合使用小问题

    遇到的低级错误,做个小记录,防止下次在陷进去........ 两行数据,分别每行做为一个字典,存传在list中,但是现在问题来了,第二行的数据会覆盖第一行.结果就是,list存储了的两个元素的数据一样 ...

  9. jQuery-表格属性

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  10. 一个获取本机ip地址的正则

    ifconfig|grep -oP '(?<=inet addr:)(?=(?!127\.0\.0\.1))\d+(\.\d+){3}'