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.