当前位置: 首页 > 知识库问答 >
问题:

AppEngine错误[java.lang.noClassDefFounderRor:org/w3c/dom/ElementTraversal]

长孙星汉
2023-03-14

我想找到解决这个问题的办法,但似乎很难。我有appengine项目使用处理注册的servlet。当我尝试调用这个servlet时,我有以下日志报告:

012-04-19 10:31:06.816 /register 500 90ms 0kb Apache-HttpClient/UNAVAILABLE (java 1.4)
ip - gecodroidtest [19/Apr/2012:10:31:06 -0700] "POST /register HTTP/1.1" 500 0 - "Apache-HttpClient/UNAVAILABLE (java 1.4)" "cloudnotifyit.appspot.com" ms=90 cpu_ms=58 api_cpu_ms=0 cpm_usd=0.001738 instance=00c61b117c772731eb45290bfcb07750c0505f
W 2012-04-19 10:31:06.794
com.cloudnotify.server.servlet.RequestInfo processRequest: xxxxxxxxxxxx@xxxx  //just for me
W 2012-04-19 10:31:06.810
Error for /register 
java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal
    at com.google.appengine.runtime.Request.process-240c2ffe1bf8ddba(Request.java)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
    at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
    at org.apache.xerces.parsers.AbstractDOMParser.startDocument(Unknown Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator.startDocument(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentScannerImpl.startEntity(Unknown Source)
    at org.apache.xerces.impl.XMLVersionDetector.startDocumentParsing(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
    at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121)
    at javax.jdo.JDOHelper.readNamedPMFProperties(JDOHelper.java:1407)
    at javax.jdo.JDOHelper.getNamedPMFProperties(JDOHelper.java:1286)
    at javax.jdo.JDOHelper.getPropertiesFromJdoconfig(JDOHelper.java:1232)
    at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:1079)
    at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:914)
    at com.cloudnotify.server.c2dm.C2DMessaging.getPMF(C2DMessaging.java:103)
    at com.cloudnotify.server.servlet.RequestInfo.initDevices(RequestInfo.java:225)
    at com.cloudnotify.server.servlet.RequestInfo.processRequest(RequestInfo.java:183)
    at com.cloudnotify.server.servlet.RegisterServlet.doPost(RegisterServlet.java:100)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:326)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
    at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
    at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:449)
    at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:455)
    at com.google.tracing.TraceContext.runInContext(TraceContext.java:695)
    at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:333)
    at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:325)
    at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:453)
    at java.lang.Thread.run(Thread.java:679)
Caused by: java.lang.ClassNotFoundException: org.w3c.dom.ElementTraversal
    at com.google.appengine.runtime.Request.process-240c2ffe1bf8ddba(Request.java)
    ... 44 more
C 2012-04-19 10:31:06.812
Uncaught exception from servlet
java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal
    at com.google.appengine.runtime.Request.process-240c2ffe1bf8ddba(Request.java)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
    at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
    at org.apache.xerces.parsers.AbstractDOMParser.startDocument(Unknown Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator.startDocument(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentScannerImpl.startEntity(Unknown Source)
    at org.apache.xerces.impl.XMLVersionDetector.startDocumentParsing(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
    at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121)
    at javax.jdo.JDOHelper.readNamedPMFProperties(JDOHelper.java:1407)
    at javax.jdo.JDOHelper.getNamedPMFProperties(JDOHelper.java:1286)
    at javax.jdo.JDOHelper.getPropertiesFromJdoconfig(JDOHelper.java:1232)
    at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:1079)
    at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:914)
    at com.cloudnotify.server.c2dm.C2DMessaging.getPMF(C2DMessaging.java:103)
    at com.cloudnotify.server.servlet.RequestInfo.initDevices(RequestInfo.java:225)
    at com.cloudnotify.server.servlet.RequestInfo.processRequest(RequestInfo.java:183)
    at com.cloudnotify.server.servlet.RegisterServlet.doPost(RegisterServlet.java:100)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:326)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
    at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
    at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:449)
    at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:455)
    at com.google.tracing.TraceContext.runInContext(TraceContext.java:695)
    at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:333)
    at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:325)
    at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:453)
    at java.lang.Thread.run(Thread.java:679)
Caused by: java.lang.ClassNotFoundException: org.w3c.dom.ElementTraversal
    at com.google.appengine.runtime.Request.process-240c2ffe1bf8ddba(Request.java)
    ... 44 more


Thanks all 

共有1个答案

都超英
2023-03-14
  • Maven解决方案:

在pom.xml中,将“xml-apis”依赖项设置为版本1.4.01:

<dependency>
    <groupId>xml-apis</groupId>
    <artifactId>xml-apis</artifactId>
    <version>1.4.01</version>
</dependency>
  • 其他所有人的解决方案:

如果不使用maven,您可以手动添加xml-apis库,版本1.4.01。您将在名为“XML Commons External 1.4.01”的xml-commons二进制包中找到JAR,您可以在这里下载它:http://xerces.apache.org/mirrors.cgi。

最后,使用这个版本的库编译和执行java应用程序/项目。

  • 解释:
 类似资料:
  • 我在发帖之前引用了这个堆栈溢出问题,我尝试了所有的解决方案,但仍然对我不起作用。我正在将一个遗留Java项目迁移到Spring Boot应用程序中。

  • 该文档对象模型允许访问和修改所有文档内容,并由万维网联盟(W3C)标准化。 几乎所有现代浏览器都支持此模型。 W3C DOM标准化了遗留DOM的大多数功能,并添加了新功能。 除了支持Document对象的forms [],images []和其他数组属性之外,它还定义了允许脚本访问和操作任何文档元素的方法,而不仅仅是形式和图像等特殊用途元素。 W3C DOM中的文档属性 此模型支持Legacy D

  • 当我在eclipse中打开javascript文件时,它返回错误 我怎样才能克服这一点。。

  • 我试图使用命令“java-jar XXXX.jar”运行spring boot项目,但出现以下错误: 错误:发生JNI错误,请检查您的安装并重试线程“main”java.lang.NoClassDefFoundError中的异常:org/modelmapper/modelmapper位于java.lang.Class.getDeclaredMethods0(本机方法),java.lang.Clas

  • 本文向大家介绍W3C DOM支持哪些方法?,包括了W3C DOM支持哪些方法?的使用技巧和注意事项,需要的朋友参考一下 以下是W3C DOM支持的方法- 序号 属性和说明 1 createAttribute(name) 返回具有指定名称的新创建的Attr节点。 例如-document.createAttribute(name) 2 createComment(text) 创建并返回一个包含指定文本

  • StackTrace: com.google.apphosting.API.apiproxy$CallNotFoundException:如果线程既不是原始请求线程,也不是ThreadManager在com.google.apphosting.API.apiproxy$callNotFoundException.ForeignThread(approxy.java:800)在com.google.