The method getTextContent()is undefined for...编译出错

在build项目中出现了The method getTextContent() is undefined for the type Element 的错误,

原因是

本来调用的那个方法应该是jdk下的那个包里的类,而在web项目里却调用了J2EE里的xml-apis.jar下的org.w3c.dom。(实际上要 调用的那个方法是在jdk下的rt.jar下的org.w3c.dom)。

解决方法

尝试了很多次。后来把jdk和J2EE在项目里的位置调整了下就好 了,即让jdk在J2EE上面.

build通过

The method getTextContent()is undefined for...编译出错

时间: 2024-08-03 22:07:41

The method getTextContent()is undefined for...编译出错的相关文章

The method getTextContent() is undefined for the type Node

The method getTextContent() is undefined for the type Node eclipse 中 如果加入了 其他了xfire 等其他xml解析包的话,使用org.w3c.dom.Node下的getTextContent()方法会出现The method getTextContent() is undefined for the type Node 提示,解决方法如下: project-->properties->java build path-->

The method getTextContent() is undefined for the type Element

使用org.w3c.dom解析XML,有时可能会报错The method getTextContent() is undefined for the type Element/Node,这种情况可能是加入了其他的XML解析jar包. 解决方法如下: 将Project->Properties->Java Build Path->Order and Export->JRE System Library移动到顶部(Top)

gradle编译出错:Execution failed for task ':app:compileTestDebugJava'.

今天更新了android studio,从0.5.3升级到0.6.1版本,结果在IDE中编译时没有问题,但是在命令行时编译就会出现以下错误: :app:compileTestDebugJava FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:compileTestDebugJava'. > No signature of method: com.a

The method getDispatcherType() is undefined for the type HttpServletRequest

web项目访问时就报错,新建的一个jsp文件里面没有任何的内容也报错,错误:The method getDispatcherType() is undefined for the type HttpServletRequest 严重: Servlet.service() for servlet [jsp] in context with path [/studentManage] threw exception [Unable to compile class for JSP: An error

日常问题记录--访问JSP文件时The method getDispatcherType() is undefined for the type HttpServletRequest

问题现象: 访问任一jsp(即使是空白文件)文件报The method getDispatcherType() is undefined for the type HttpServletRequest错误. 定位: 根据错误提示,查询到getDispatcher位于servlet-api.jar包中. 反编译tomcat/webapp/proj/lib中的servelt-api.jar,发现确实没有这个方法: 问题解决: 清理这个包,删除之,并升级到最新的servelt-api包.解决:

maven依赖本地非repository中的jar包-依赖jar包放在WEB-INF/lib等目录下的情况客户端编译出错的处理

maven依赖本地非repository中的jar包 http://www.cnblogs.com/piaolingxue/archive/2011/10/12/2208871.html 博客分类: MAVEN 今天在使用maven编译打包一个web应用的时候,碰到一个问题: 项目在开发是引入了依赖jar包,放在了WEB-INF/lib目录下,并通过buildpath中将web libariary导入. 在eclipse中开发没有问题,但是使用maven编译插件开始便宜总是报找不到WEB-INF

WINCE6.0新建工程编译出错的问题

作者:LoongEmbedded(kandi) 时间:2011.8.13 类别:WINCE系统开发 ********************************LoongEmbedded******************************** 基于WINCE6.0系统,根据PDA模板新建了工程之后,现把遇到的问题和解决的方法记录一下 1.     编译系统找不到atls.lib 这里要特别注意的是,发生类似这样的错误的时候,如果从\WINCE600\build.err文件来找错误的原

Tomcat6服务端工程部署Tomcat8遇到的 “The method getDispatcherType() is undefined for the type HttpServletRequest” 问题

一个安卓服务端程序起初部署在Tomcat6.0当中,但是当我用Tomcat8.0部署时,出现了一个错误: org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: [52] in the generated java file: [D:\apache-tomcat-8.0.15\work\Catalina\localhost\allRunServer\org\apa

Cocos2d-x 3.0 编译出错 解决 error: expected ';' at end of member declaration

近期把项目移植到cocos2d-x 3.0,在整Android编译环境的时候,出现一大堆的编译出错,都是类似"error: expected ';' at end of member declaration"之类的,看了一些编译错误,都是cocos2d-x库里面的代码出错. 经过分析,怀疑可能是编译环境的问题,由于cocos2d-x使用了非常多C++11的新特性,这有可能导致老的编译器出错,看了一下NDK以下的文件以及toolchains里面的内容,windows编译器默认使用4.6,