The following problems were encountered during project implementation:
Info: couldn't set dynamic validation feature org. xml. Sax. saxnotrecognizedexception: sax feature 'HTTP: // apache.org/xml/features/validation/dynamic' not recognized .......
After careful analysis, the cause of this error is that the XML parser in WebLogic 10.3 has a problem. In WebLogic Server 10.3, weblogic. jar META-INF/services/javax. XML. parsers. saxparserfactory specifies the default SAX Parser class, that is, weblogic. XML. JAXP. registrysaxparserfactory.
Decompiling the code of this class finds that this class inherits from saxparserfactory, but does not correctly override the related methods of its parent class, that is, the setxinludeaware () method in registrysaxparserfactory class should be setxincludeaware (), this should be a developer's spelling mistake, which is a WebLogic bug.
Public void setxinludeaware (Boolean paramboolean) <br/>{< br/> This. factoryproperties. Put (saxfactoryproperties. xincl, paramboolean); <br/> If (this. factory! = NULL) <br/> This. Factory. setxincludeaware (paramboolean); <br/>}
The API of its parent class is used as evidence:
Setxincludeaware
Public void setxincludeaware (Boolean state)
Set the xinclude processing status.
If the xinclude mark is found in the document instance, it should be processed in the method specified in XML versions (xinclude) Version 1.0.
The default value of xinclude processing is false.
Parameter: State-set xinclude processing to true or false throw: unsupportedoperationexception-when this implementation does not override this method, it starts from the following versions: 1.5
Solution:
Edit setdomainenv. CMD/setdomainenv. SH and insert
. CMD: Set java_options = % java_options %-djavax. XML. parsers. saxparserfactory = com.sun.org. apache. xerces. internal. JAXP. saxparserfactoryimpl <br/>. SH: java_options = "$ {java_options}-djavax. XML. parsers. saxparserfactory = com.sun.org. apache. xerces. internal. JAXP. saxparserfactoryimpl "<br/> export java_options
This article is transferred from Oracle Seeker: http://oracleseeker.com/2009/09/11/weblogic_sax_not_recognized/