The method getDispatcherType() is undefined for the type HttpServletRequest
在使用百度的ueditor的时候,老是报错:
The method getDispatcherType() is undefined for the type HttpServletRequest
原因可能有二:1、是jar冲突了,把servlet-api的jar包直接删了就ok了。
2、tomcat版本低了,升级后就ok。
补充一下,关于第一个原因,我们可以扩展下,如果做java开发的时候,碰到class找不到或者method找不到的错误时,可以使用下面的命令
dependency:tree -Dverbose(如果集成了maven,可以直接使用此命令。如果没有,需要在命令前增加 mvn : mvn dependency:tree -Dverbose)
这样就会得到下面的输出,此时就可以分析哪些jar包冲突以及jvm在运行时加载了哪个class。如果遇到jar包冲突,可以在pom的dependency Hierarchy视图中选择加载jar包,排除
特定版本的jar包。
[INFO] cn.todaycity:web-sf:war:0.0.1-SNAPSHOT
[INFO] +- cn.todaycity:server-data-provider-clients-image:jar:2.0.1.1025:compile
[INFO] | +- com.aliyun.oss:aliyun-sdk-oss:jar:2.2.0:compile
[INFO] | | +- (org.apache.httpcomponents:httpclient:jar:4.4.1:compile - omitted for duplicate)
[INFO] | | +- org.jdom:jdom:jar:1.1:compile
[INFO] | | \- net.sf.json-lib:json-lib:jar:jdk15:2.4:compile
[INFO] | | +- commons-beanutils:commons-beanutils:jar:1.8.0:compile
[INFO] | | | \- (commons-logging:commons-logging:jar:1.1.1:compile - omitted for conflict with 1.2)
[INFO] | | +- commons-collections:commons-collections:jar:3.2.1:compile
[INFO] | | +- (commons-lang:commons-lang:jar:2.5:compile - omitted for conflict with 2.6)
[INFO] | | +- (commons-logging:commons-logging:jar:1.1.1:compile - omitted for conflict with 1.2)
The method getDispatcherType() is undefined for the type HttpServletRequest的更多相关文章
- The method getDispatcherType() is undefined for the type HttpServletRequest 升级到tomcat8(转)
配置项目,从tomcat低版本,放到tomcat8时,正常的项目居然报错了: The method getDispatcherType() is undefined for the type Http ...
- 升级到tomcat8遇到The method getDispatcherType() is undefined for the type HttpServletRequest
今天升级到tomcat8,发现原来的项目不能运行了,遇到下面的错误:The method getDispatcherType() is undefined for the type HttpServl ...
- The method getDispatcherType() is undefined for the type HttpServletRequest错误解决方法
使用Eclipse Luna版本,jdk1.7和tomcat8.0开发JAVA EE应用.写一个简单的JSP部署后访问报JSP编译错误,具体错误信息如下: The method getDispatch ...
- The method getServletContext() is undefined for the type HttpServletRequest
request.getServletContext().getRealPath("/") 已经加入了 sun runtime library但是还是提示错误 是因为 写法过时了改成 ...
- The method getTextContent() is undefined for the type Node
eclipse 中 如果加入了 其他了xfire 等其他xml解析包的话,使用org.w3c.dom.Node下的getTextContent()方法会出现The method getTextCont ...
- notification 报错the method build() is undefined for the type Notificatin.Builder
notification 报错the method build() is undefined for the type Notificatin.Builder 这事api版本号太低导致的 Notifi ...
- getTextContent()方法会出现The method getTextContent() is undefined for the type Node 提示
eclipse 中 如果加入了 其他了xfire 等其他xml解析包的话,使用org.w3c.dom.Node下的getTextContent()方法会出现The method getTextCont ...
- dao 接口定义了一个方法,报错 The method xxx is undefined for the type xxx;
转自:https://blog.csdn.net/panshoujia/article/details/78203837 持久层(DAO层)下的一个接口 ,eclipse报了一个The method ...
- The method getContextPath() is undefined for the type ServletContext
我出错时,到网上说得是版本问题,我找到对应的包javax-servlet5.1.12.jar,把它删了,居然不报错了,原来是和包servlet-2_5-api.jar冲突了
随机推荐
- 外网通过root账户访问虚拟机mysql
http://www.cnblogs.com/live41/archive/2013/04/02/2995178.html
- Linux压缩和解压汇总
各种后缀的压缩包压缩方法和解压方法 压缩包 压缩 解压 .tar.gz和.tgz tar -czf jpg.tar.gz *.jpg tar -xzvf filename -C path .tar.b ...
- PHP-----练习-------租房子-----增删改查,多条件查询
练习-------租房子-----增删改查,多条件 一 .题目要求: 二 .做法: [1]建立数据库 [2]封装类文件------DBDA.class.php <?php class DBDA ...
- Error:identifer “blockIdx” and __syncthreads() undefined
#include "device_launch_parameters.h" for blockIdx #include "device_functions.h" ...
- IP地址,子网掩码,默认网关,DNS服务器详解
为了更深入的学习TCP/IP协议,最近看了不少有关资料,收集整理记录如下,以备后面的使用和方便各位学习: IP地址,子网掩码,默认网关,DNS服务器是什么意思? (一) 问题解析 001. 问: ...
- 《C#本质论》读书笔记(15)使用查询表达式的LINQ
15.1 查询表达式的概念 简单的查询表达式 private static void ShowContextualKeywords1() { IEnumerable<string> sel ...
- AngularJS介绍
AngularJS介绍–AngularJS的前世今生 AngularJS是什么 在Web开发领域,我们一般使用HTML作为前端页面元素的声明式语言,使用CSS技术作为展示样式的描述语言,JavaScr ...
- 在IntelliJ IDEA中添加框架支持时找不到Hibernate的解决办法
问题描述 第一次在Add Frameworks support界面中添加hibernate支持的时候,异常中断,导致没有成功添加. 第二次进入Add Frameworks support窗口时,发现找 ...
- Python学习笔记(三)——类型与变量
一.输入与输出 print("string"); print("string1","string2","string3" ...
- python base64的加密与解密
Base64编码是一种“防君子不防小人”的编码方式.广泛应用于MIME协议,作为电子邮件的传输编码,生成的编码可逆,后一两位可能有“=”,生成的编码都是ascii字符. 优点:速度快,ascii字符, ...