org.w3c.dom.ls.LSException: java.lang.NullPointerException,中文編程

來源:互聯網
上載者:User

org.w3c.dom.ls.LSException: java.lang.NullPointerException,中文編程

作業環境:

OS:WIN 10.0.14393 x64 家庭版

JDK:JavaSE 1.5.0_20 i586

Tomcat:6.0.48 win32

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

操作過程:

執行startup.bat,啟動Tomcat。

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

異常資訊:

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源碼:

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 the
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 >> }

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.