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冲突了
随机推荐
- PHPStorm XDebug的安装
环境: 我的系统: 4.4.0-43-generic #63-Ubuntu SMP Wed Oct 12 13:48:03 UTC 2016 x86_64 x86_64 x86_64 GNU/Linu ...
- Qt:postEvent 与 customEvent() 函数 进行异步通信; 以及参数的传递 // 防止界面卡死;;
class ColorChangeEvent : public QCustomEvent { public: ColorChangeEvent( QColor color ) : QCustomEve ...
- springMVC接收参数的几种方式
Spring3 MVC请求参数获取的几种方法 一. 通过@PathVariabl获取路径中的参数 @RequestMapping(value="user/{id}/{name}&q ...
- c语言libcurl库的异步用法
multi接口的使用会比easy 接口稍微复杂点,毕竟multi接口是依赖easy接口的,首先粗略的讲下其使用流程:curl_multi _init初始化一个multi curl对象,为了同时进行多个 ...
- javax.validation.ConstraintViolationException---Hibernate后台实体校验
javax.validation.ConstraintViolationException ... 71 moreCaused by: javax.validation.ConstraintViola ...
- Java面试:1
月薪10000以上: 1.了解Java的反射机制 2. 了解泛型的原理 3. 了解Spring框架的基本原理 4. 熟悉设计模式 5. 了解如斐波那契数列之类的简单算法月薪20000以上: 1. 精通 ...
- 【XLL 框架库函数】 QuitFramework
去初使化框架库,简问题是才的重新初使化 XLOPER/XLOPER12. 参数 这个函数没有参数 属性值/返回值 这个函数没有返回值.
- C#运算符
运算符 1.算数运算符 赋值运算符 等号在C#中并不是表示相等的意思,而是表示赋值,把等号右边的值赋值给 等号左边的变量 由等号连接的表达式,叫做赋值表达式.我们要求等号两边的数据类型必须一 致. 2 ...
- nginx 反向代理 配置 https 实现http https同时存在
server { listen ssl; #监听443端口 server_name www.app01.com; ssl on; #启用ssl加密 ssl_certificate /etc/cert/ ...
- python开发目录合并小工具 PathMerge
前言 这个程序陆陆续续开发了几天,正好我在学Python,就一边做一边学,倒是学到不少东西. 不得不说python是快速开发的好工具. 程序做了一些改进,这两天又忙着毕设,现在才想起来发到博客上.想想 ...