Solutions to problems when using struts in resin

Source: Internet
Author: User
Tags log4j

The following is from: http://zxub.cnblogs.com/archive/2005/11/04/269170.aspx

Before the final </web-app> in Web.xml, add the following

<system-property javax.xml.transform.transformerfactory= "Org.apache.xalan.processor.TransformerFactoryImpl"/ >
<system-property javax.xml.parsers.documentbuilderfactory= "Org.apache.xerces.jaxp.DocumentBuilderFactoryImpl "/>
<system-property javax.xml.parsers.saxparserfactory= "Org.apache.xerces.jaxp.SAXParserFactoryImpl"/>
<system-property org.xml.sax.driver= "Org.apache.xerces.parsers.SAXParser"/>

Nothing to see the next hibernate, and struts, with the use of MyEclipse 4.0.2, try to build a web aplication with MyEclipse, add hibernate capabilities and add Struts capabilities, then run resin  3.0.14, see the error, the beginning is a log4j problem, this is the hibernate problem, put hibernate (SRC) etc in the Log4j.properties files copied to and hibernate.cfg.xml the same directory, there is no such problem, the remaining problems are as follows:
21:13:32,  error digester: 686  - digester.getparser: 
Org.xml.sax.saxnotrecognizedexception: http://Apache.org/xml /features/validation/dynamic
    at  Com.caucho.xml.parsers.XmlSAXParserFactory.setFeature (xmlsaxparserfactory.java:94)
     At org.apache.commons.digester.parser.xercesparser.configurexerces (xercesparser.java:185)
     at org.apache.commons.digester.parser.xercesparser.newsaxparser (xercesparser.java:138)

Online check, is unable to find the cause of Xercesimpl.jar, the solution is as follows:
Method One: Under the%java_home%/jre/lib folder, create a jaxp.properties file with only one sentence
Javax.xml.parsers.SAXParserFactory:org.apache.xerces.jaxp.SAXParserFactoryImpl

Solve the problem.
Method Two: Find Xercesimpl.jar, copy to%java_home%/jre/lib/endorsed below (without this directory to create this directory), problem solving.

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.