Org. w3c. dom. ls. LSException: java. lang. NullPointerException, Chinese programming

Source: Internet
Author: User

Org. w3c. dom. ls. LSException: java. lang. NullPointerException, Chinese programming

Operating Environment:

OS: WIN 10.0.14393 x64 family Edition

JDK: JavaSE 1.5.0 _ 20 i586

Tomcat: 6.0.48 win32

-----------------------------------------------------------------

Procedure:

Run startup. bat to start Tomcat.

-----------------------------------------------------------------

Exception information:

Org. w3c. dom. ls. LSException: java. lang. NullPointerException
At com.sun.org. apache. xml. internal. serialize. DOMSerializerImpl. writeToString (DOMSerializerImpl. java: 546)
At org. apache. catalina. core. JreMemoryLeakPreventionListener. lifecycleEvent (JreMemoryLeakPreventionListener. java: 410)
At org. apache. catalina. util. LifecycleSupport. fireLifecycleEvent (LifecycleSupport. java: 142)
At org. apache. catalina. core. StandardServer. initialize (StandardServer. java: 820)
At org. apache. catalina. startup. Catalina. load (Catalina. java: 538)
At org. apache. catalina. startup. Catalina. load (Catalina. java: 562)
At sun. reflect. NativeMethodAccessorImpl. invoke0 (Native Method)
At sun. reflect. NativeMethodAccessorImpl. invoke (NativeMethodAccessorImpl. java: 39)
At sun. reflect. DelegatingMethodAccessorImpl. invoke (DelegatingMethodAccessorImpl. java: 25)
At java. lang. reflect. Method. invoke (Method. java: 592)
At org. apache. catalina. startup. Bootstrap. load (Bootstrap. java: 261)
At org. apache. catalina. startup. Bootstrap. main (Bootstrap. java: 413)

-----------------------------------------------------------------

Tomcat source code:

388> if (xmlParsingProtection ){
389> // There are three known issues with XML parsing
390> // 1. DocumentBuilderFactory. newInstance (). newDocumentBuilder ();
391> // http://bugs.sun.com/bugdatabase/view_bug.do? Bug_id = 6916498
392> // This issue is fixed in Java 7 onwards
393> DocumentBuilderFactory factory = DocumentBuilderFactory. newInstance ();
394> try {
395> DocumentBuilder documentBuilder = factory. newDocumentBuilder ();
396> // The 2nd and 3rd links both relate to cached Exception
397> // instances that retain a link to the TCCL via
398> // backtrace field. Note that YourKit only shows this
399> // field when using the HPROF format memory snapshots.
400> // https://bz.apache.org/bugzilla/show_bug.cgi? Id = 58486
401> // These issues are currently present in all current
402> // versions of Java
403> // 2. com.sun.org. apache. xml. internal. serialize. DOMSerializerImpl
404> Document document = documentBuilder. newDocument ();
405> document. createElement ("dummy ");
406> DOMImplementationLS implementation =
407 >>> (DOMImplementationLS) document. getImplementation ();
408> implementation. createLSSerializer (). writeToString (document );
409> // 3. com.sun.org. apache. xerces. internal. dom. DOMNormalizer
410> document. normalize ();
411 >>} catch (ParserConfigurationException e ){
412> log. error (sm. getString ("jreLeakListener. xmlParseFail "),
413> e );
414 >>}
415 >>}

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.