java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal

Liferay Issues | Alexey Kakunin | 5 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    I have portlet with xercesImpl.jar included via liferay-plugin-package.properties file. This portlet worked fine in Liferay 6.0 When I'm deploying this portlet and trying to render any it's portlet on any page - I've got error (stacktrace:) 17:19:24,706 ERROR [render_portlet_jsp:154] java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2823) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1160) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1655) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1533) at org.apache.jasper.xmlparser.ParserUtils.parseXMLDocument(ParserUtils.java:96) at org.apache.jasper.compiler.JspConfig.processWebDotXml(JspConfig.java:83) at org.apache.jasper.compiler.JspConfig.init(JspConfig.java:231) at org.apache.jasper.compiler.JspConfig.findJspProperty(JspConfig.java:290) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:114) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:373) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:353) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:340) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) Caused by: java.lang.ClassNotFoundException: org.w3c.dom.ElementTraversal at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1688) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1533) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2823) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1160) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1655) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1533) 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 org.apache.jasper.xmlparser.ParserUtils.parseXMLDocument(ParserUtils.java:96) at org.apache.jasper.compiler.JspConfig.processWebDotXml(JspConfig.java:83) at org.apache.jasper.compiler.JspConfig.init(JspConfig.java:231) at org.apache.jasper.compiler.JspConfig.findJspProperty(JspConfig.java:290) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:114) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:373) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:353) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:340) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530) at com.liferay.portlet.PortletRequestDispatcherImpl.dispatch(PortletRequestDispatcherImpl.java:316) at com.liferay.portlet.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:105) at com.liferay.util.bridges.mvc.MVCPortlet.include(MVCPortlet.java:366) at com.liferay.util.bridges.mvc.MVCPortlet.include(MVCPortlet.java:382) yes - specific class is not included into my portlet. Looks like before - xercesImpl was used with liferay's classpath and now it is used from Liferay with using my portlet classpath. Is it correct?

    Liferay Issues | 5 years ago | Alexey Kakunin
    java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal
  2. 0

    I have portlet with xercesImpl.jar included via liferay-plugin-package.properties file. This portlet worked fine in Liferay 6.0 When I'm deploying this portlet and trying to render any it's portlet on any page - I've got error (stacktrace:) 17:19:24,706 ERROR [render_portlet_jsp:154] java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2823) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1160) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1655) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1533) at org.apache.jasper.xmlparser.ParserUtils.parseXMLDocument(ParserUtils.java:96) at org.apache.jasper.compiler.JspConfig.processWebDotXml(JspConfig.java:83) at org.apache.jasper.compiler.JspConfig.init(JspConfig.java:231) at org.apache.jasper.compiler.JspConfig.findJspProperty(JspConfig.java:290) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:114) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:373) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:353) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:340) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) Caused by: java.lang.ClassNotFoundException: org.w3c.dom.ElementTraversal at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1688) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1533) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2823) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1160) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1655) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1533) 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 org.apache.jasper.xmlparser.ParserUtils.parseXMLDocument(ParserUtils.java:96) at org.apache.jasper.compiler.JspConfig.processWebDotXml(JspConfig.java:83) at org.apache.jasper.compiler.JspConfig.init(JspConfig.java:231) at org.apache.jasper.compiler.JspConfig.findJspProperty(JspConfig.java:290) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:114) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:373) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:353) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:340) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530) at com.liferay.portlet.PortletRequestDispatcherImpl.dispatch(PortletRequestDispatcherImpl.java:316) at com.liferay.portlet.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:105) at com.liferay.util.bridges.mvc.MVCPortlet.include(MVCPortlet.java:366) at com.liferay.util.bridges.mvc.MVCPortlet.include(MVCPortlet.java:382) yes - specific class is not included into my portlet. Looks like before - xercesImpl was used with liferay's classpath and now it is used from Liferay with using my portlet classpath. Is it correct?

    Liferay Issues | 5 years ago | Alexey Kakunin
    java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    java.lang.NoClassDefFoundError: com/sun/istack/localization/Localizable?

    Stack Overflow | 4 years ago | Sayed Jabnoun
    java.lang.ClassNotFoundException: com.sun.istack.localization.Localizable
  5. 0

    ClassNotFoundException in JSON Parsing by servlet

    Stack Overflow | 3 years ago | Avinash Singh
    java.lang.ClassNotFoundException: org.apache.commons.lang.exception.NestableRuntimeException

  1. treefolk 2 times, last 1 month ago
  2. Tahir 2 times, last 4 months ago
  3. Piz 2027 times, last 6 months ago
  4. jedcua 1 times, last 7 months ago
  5. esaar 3 times, last 7 months ago
5 more registered users
90 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.ClassNotFoundException

    org.w3c.dom.ElementTraversal

    at org.apache.catalina.loader.WebappClassLoader.loadClass()
  2. Glassfish Core
    WebappClassLoader.loadClass
    1. org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1688)
    2. org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1533)
    2 frames
  3. Java RT
    SecureClassLoader.defineClass
    1. java.lang.ClassLoader.defineClass1(Native Method)
    2. java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    3. java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    4. java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    4 frames
  4. Glassfish Core
    WebappClassLoader.loadClass
    1. org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2823)
    2. org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1160)
    3. org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1655)
    4. org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1533)
    4 frames
  5. Xerces2-j
    DocumentBuilderImpl.parse
    1. org.apache.xerces.parsers.AbstractDOMParser.startDocument(Unknown Source)
    2. org.apache.xerces.impl.dtd.XMLDTDValidator.startDocument(Unknown Source)
    3. org.apache.xerces.impl.XMLDocumentScannerImpl.startEntity(Unknown Source)
    4. org.apache.xerces.impl.XMLVersionDetector.startDocumentParsing(Unknown Source)
    5. org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    6. org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    7. org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    8. org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
    9. org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
    9 frames
  6. GWT dev
    JspServlet.service
    1. org.apache.jasper.xmlparser.ParserUtils.parseXMLDocument(ParserUtils.java:96)
    2. org.apache.jasper.compiler.JspConfig.processWebDotXml(JspConfig.java:83)
    3. org.apache.jasper.compiler.JspConfig.init(JspConfig.java:231)
    4. org.apache.jasper.compiler.JspConfig.findJspProperty(JspConfig.java:290)
    5. org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:114)
    6. org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)
    7. org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
    8. org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
    9. org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
    10. org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
    11. org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
    12. org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
    12 frames
  7. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    1 frame
  8. Glassfish Core
    ApplicationFilterChain.doFilter
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    2 frames
  9. Liferay Portal Service
    InvokerFilter.doFilter
    1. com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
    2. com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
    2 frames
  10. Glassfish Core
    ApplicationDispatcher.include
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    3. org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
    4. org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593)
    5. org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530)
    5 frames
  11. Liferay Portal Service
    PortletRequestDispatcherImpl.include
    1. com.liferay.portlet.PortletRequestDispatcherImpl.dispatch(PortletRequestDispatcherImpl.java:316)
    2. com.liferay.portlet.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:105)
    2 frames
  12. Liferay Util Bridges
    MVCPortlet.include
    1. com.liferay.util.bridges.mvc.MVCPortlet.include(MVCPortlet.java:366)
    2. com.liferay.util.bridges.mvc.MVCPortlet.include(MVCPortlet.java:382)
    2 frames