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

时间: 2024-11-04 08:17:43

org.w3c.dom.ls.LSException: java.lang.NullPointerException的相关文章

在Servlet使用getServletContext()获取ServletContext对象出现java.lang.NullPointerException(空指针)异常的解决办法

今天遇到了一个在servlet的service方法中获取ServletContext对象出现java.lang.NullPointerException(空指针)异常,代码如下: 1 //获取ServletContext对象 2 ServletContext servletContext = this.getServletContext(); 这个问题很奇怪,也是第一次遇到,因为以前在servlet的doGet/doPost方法中要获取ServletContext对象时都是这样写的,也没有出现过

解决kylin build cube第一步报错:java.lang.NullPointerException

报错栈: 2017-06-19 10:27:35,757 ERROR [pool-9-thread-4] threadpool.DefaultScheduler:140 : ExecuteException job:933bc47a-302c-48fa-8ec9-ae8730057175 org.apache.kylin.job.exception.ExecuteException: org.apache.kylin.job.exception.ExecuteException: java.la

?--Porg.springframework.beans.MethodInvocationException: Property 'username' threw exception; nested exception is java.lang.NullPointerException

使用BoneCP作为连接池,在启动Tomcat报出以下异常: 一月 02, 2016 2:12:17 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:mynewdpi' did not find a

百度地图定位 java.lang.NullPointerException

整了四五天显示的地图终于不是北京了,心酸泪一把T~T. java.lang.NullPointerException 是空指针异常,问候了度娘,又看了几遍自己的代码都没觉得有异常, 突发奇想的改了改代码竟然成了..... (下面是改完后的代码) 1 public class Local_MainActivity extends Activity { 2 private MapView mapView; 3 private BaiduMap baiduMap; 4 private Location

一般报java.lang.NullPointerException的原因有以下几种

一般报java.lang.NullPointerException的原因有以下几种: ·字符串变量未初始化: ·接口类型的对象没有用具体的类初始化,比如: List lt; 会报错 List lt = new ArrayList(); 则不会报错了 ·当一个对象的值为空时,你没有判断为空的情况. 你可以试着把下面的代码前加一行代码: if(rb!=null); ................... String类型的对象可以做如下判断 if(rb!==null&&!""

java.lang.NullPointerException at com.pp.controller.PPUserController.updateDetail(PPUserController.java:34)

问题原因:忘记写@Resource: 由此而知:可能是service没有引进去. 全部错误代码: 22:33:17,883 DEBUG SessionImpl:243 - Opened session at timestamp: 14308363978 22:34:11,470 ERROR AdminController:39 - 用户User [id=11, name=caowenyan, pwd=null, mail=null, photo=null, createdate=null, lo

解决Context.getExternalFilesDir(null)返回null造成java.lang.NullPointerException的问题

问题产生: 今天在写一个日志工具类的时候,想把日志文件放在外存储设备的应用专用文件夹里,即,如:/mnt/sdcard/myPackageName /Android/data/files下.很自然的用起来Context.getExternalFilesDir(null)方法,但是在写好工具 类,测试时报java.lang.NullPointerException,懵了! 找了好久的解决方法: 有说是因为   权限问题,把< uses-permission android:name ="an

java.lang.NullPointerException: No FileItemFactory has been set.

1.错误描述 java.lang.NullPointerException: No FileItemFactory has been set. at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:354) at org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.ja

android启动时报错Unable to instantiate application xxxx:java.lang.NullPointerException

如果程序已经运行,再安装到手机的时候总是报以下错误.而且是在打开特定的Activity的情况下才会报错. 06-26 09:45:16.971: E/AndroidRuntime(29733): java.lang.RuntimeException: Unable to instantiate application com.css.promotiontool.ui.CSSAppliction: java.lang.NullPointerException06-26 09:45:16.971: