简体   繁体   English

NoClassDefFoundError: org/w3c/dom/ElementTraversal

[英]NoClassDefFoundError: org/w3c/dom/ElementTraversal

I installed Jetty 7 and configured it correcty for IdP Shibboleth following this guide: https://wiki.shibboleth.net/confluence/display/SHIB2/IdPJetty7Prepare我安装了 Jetty 7 并按照本指南为IdP Shibboleth 进行了正确配置: https ://wiki.shibboleth.net/confluence/display/SHIB2/IdPJetty7Prepare

But when i try to start Jetty I get this error:但是当我尝试启动 Jetty 时,我收到此错误:

NoClassDefFoundError: org/w3c/dom/ElementTraversal

To resolve this issue i need to install the ElementTraversal dependency and include it on my classpath .要解决此问题,我需要安装ElementTraversal依赖项并将其包含在我的类路径中
But how can i accomplish this?但我怎样才能做到这一点? Do i need to download this Class [ElementTraversal.class] or a .jar file?我需要下载这个类[ElementTraversal.class]还是一个.jar文件? and where i can place it?我可以把它放在哪里? in the JETTY_HOME ?JETTY_HOME Do I need to export the CLASSPATH ?我需要导出CLASSPATH吗?

Can someone help me?有人能帮我吗?
Thank you so much!非常感谢!

It looks like ElementTraversal is part of xml-apis-2.10.0.jar which should have been provided with your Shibboleth installation. 看起来ElementTraversal是xml-apis-2.10.0.jar一部分,它应该与您的Shibboleth安装一起提供。

So if you were following these instructions you should also have followed this step: 因此,如果您遵循这些说明,您也应该遵循以下步骤:

Endorse Xerces and Xalan by creating the directory JETTY_HOME/lib/endorsed/ and copy the .jar files included in the IdP source endorsed/ directory into the newly created directory. 通过创建目录JETTY_HOME / lib / endorsed /来支持Xerces和Xalan,并将IdP源endorsed /目录中包含的.jar文件复制到新创建的目录中。

So long as you copied all the jar files appropriately, it should be okay. 只要你适当地复制了所有jar文件,它应该没问题。 My guess is that you missed out that step - or perhaps only copied the jar files with Xalan or Xerces in the name, and missed the other two. 我的猜测是你错过了那一步 - 或者只是在名字中复制了带有Xalan或Xerces的jar文件,而错过了其他两个。

In my case the problem was fixed by changing xml-apis version from 1.3.04 to 1.4.01. 在我的情况下,通过将xml-apis版本从1.3.04更改为1.4.01来解决问题。

BTW, version 2.10.0 doesn't exist in Maven Central (I'm curious where did Jon Skeet find it). 顺便说一句,版本2.10.0在Maven Central中不存在(我很好奇Jon Skeet在哪里找到它)。

Add this in your file, to resolve the dependency: 在您的文件中添加它,以解决依赖关系:

 <dependency>
      <groupId>xml-apis</groupId>
      <artifactId>xml-apis</artifactId>
      <version>1.4.01</version>
 </dependency>

In my case, it was gradle-spoon-plugin .就我而言,它是gradle-spoon-plugin None of the solutions did help.所有解决方案都没有帮助。 What we could do was just remove it totally from the project.我们能做的就是将它从项目中完全删除。

See: https://github.com/jaredsburrows/gradle-spoon-plugin/issues/96参见: https : //github.com/jaredsburrows/gradle-spoon-plugin/issues/96

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 java.lang.NoClassDefFoundError:org / w3c / dom / ElementTraversal - java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal Gradle PMD-plugin获取java.lang.NoClassDefFoundError:org / w3c / dom / ElementTraversal - Gradle PMD-plugin gets java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal Maven 依赖冲突:org.w3c.dom.ElementTraversal - Maven Dependency Conflict: org.w3c.dom.ElementTraversal NoClassDefFoundError: org/w3c/dom/ls/DocumentLS 与 com.sun.msv.generator.Driver - NoClassDefFoundError: org/w3c/dom/ls/DocumentLS with com.sun.msv.generator.Driver NoClassDefFoundError: org/w3c/dom/ls/DocumentLS 当 log4j 用于另一个模块 - NoClassDefFoundError: org/w3c/dom/ls/DocumentLS when log4j is used in another module Java 错误 [线程“主”java.lang.NoClassDefFoundError: org/w3c/dom/Window 中的异常] - Java Error [Exception in thread “main” java.lang.NoClassDefFoundError: org/w3c/dom/Window] NoClassDefFoundError:org/w3c/dom/ls/DocumentLS - 在编译时修复后仅在部署时发生的问题 - NoClassDefFoundError: org/w3c/dom/ls/DocumentLS - issue occurring only on deployment after having fixed it on compile time Caused by: java.lang.ClassNotFoundException: org.w3c.dom.ElementTraversal error in jenkins when building android 项目 - Caused by: java.lang.ClassNotFoundException: org.w3c.dom.ElementTraversal error in jenkins when building android project java.lang.NoClassDefFoundError: org/openqa/selenium/remote/codec/w3c/W3CHttpCommandCodec - java.lang.NoClassDefFoundError: org/openqa/selenium/remote/codec/w3c/W3CHttpCommandCodec java.lang.NoClassDefFoundError:org / w3c / tidy / Tidy,Maven项目 - java.lang.NoClassDefFoundError: org/w3c/tidy/Tidy , Maven project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM