Java. Lang. abstractmethoderror: org. Apache. xerces. Dom. entimpl. setxmlversion

Source: Internet
Author: User

When I learned the struts2.0 authoritative guide, I encountered the following error:

 

Configuration complete: the following error occurs:
Severe: exception starting filter struts2
Java. Lang. abstractmethoderror: org. Apache. xerces. Dom. entimpl. setxmlversion (ljava/lang/string;) V

My configuration is as follows:
Five jar packages are used:
Commons-loggin-1.1.jar
Freemarker-2.3.13.jar
Ognl-2.6.11.jar
Struts2-core-2.1.6.jar
Xwork-2.1.2.jar
The content of the web. xml file is as follows:
<? XML version = "1.0" encoding = "UTF-8"?>
<Web-app version = "2.4" xmlns = "http://java.sun.com/xml/ns/j2ee"
Xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance"
Xsi: schemalocation = "http://java.sun.com/xml/ns/j2ee
Http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd>

<! -- Struts2 -->
<Filter>
<Filter-Name> struts2 </filter-Name>
<Filter-class>
Org. Apache. struts2.dispatcher. filterdispatcher
</Filter-class>
</Filter>
<Filter-mapping>
<Filter-Name> struts2 </filter-Name>
<URL-pattern>/* </url-pattern>
</Filter-mapping>
</Web-app>
Final Solution: From the blog the reason was in JVM version. platforms where deployment
Was successful used JVM 1.5 but problematical one had JVM 1.6. sax2dom class from Java 1.6 has a call to define entimpl: setxmlversion () from
Itssetdocumentinfo ().
The version of xerces library I used doesn't have this method-it's a real reason of exception. So after I downloaded the latest version of xerces everything works fine.

I am not very good at English: it is probably a version problem in JVM. No jar package in JVM can parse the itsetjavasnetinfo () method, and the jar package for parsing is missing, an xerces was downloaded online. jar package to solve the problem
Struts2.0 parses and starts normally.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.