javax.xml.transform.TransformerException: java.lang.NullPointerException

Spring JIRA | JohannesB | 10 months ago
  1. 0

    We have developed a couple of Spring Webservices deployed on Tomcat in a (stateless) Docker container that from time to time somehow fail to start correctly and return a stacktrace instead of the WSDL. Restarting the container will almost always fix it at the first attempt. The same issue was reported here by someone else: http://forum.spring.io/forum/spring-projects/web-services/122858-thread-safety-issue-with-requests-to-wsdl It looks like it is similar to bugs like these: * https://issues.apache.org/jira/browse/XERCESJ-211 * https://netbeans.org/bugzilla/show_bug.cgi?id=111862#c15 Below the complete stacktrace: 08:14:35.378 [http-nio-8080-exec-1] DEBUG o.s.w.t.h.MessageDispatcherServlet - Could not complete request javax.xml.transform.TransformerException: java.lang.NullPointerException at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:752) ~[na:1.8.0_40-internal] at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:357) ~[na:1.8.0_40-internal] at org.springframework.ws.transport.http.WsdlDefinitionHandlerAdapter.handle(WsdlDefinitionHandlerAdapter.java:144) ~[spring-ws-core-2.2.0.RELEASE.jar:2.2.0.RELEASE] at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:285) ~[spring-ws-core-2.2.0.RELEASE.jar:2.2.0.RELEASE] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961) [spring-webmvc-4.0.5.RELEASE.jar:4.0.5.RELEASE] at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852) [spring-webmvc-4.0.5.RELEASE.jar:4.0.5.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:618) [servlet-api.jar:na] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837) [spring-webmvc-4.0.5.RELEASE.jar:4.0.5.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) [servlet-api.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291) [catalina.jar:8.0.20] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.20] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-websocket.jar:8.0.20] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [catalina.jar:8.0.20] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.20] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) [catalina.jar:8.0.20] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [catalina.jar:8.0.20] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) [catalina.jar:8.0.20] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) [catalina.jar:8.0.20] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [catalina.jar:8.0.20] at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610) [catalina.jar:8.0.20] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [catalina.jar:8.0.20] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:516) [catalina.jar:8.0.20] at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1086) [tomcat-coyote.jar:8.0.20] at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:659) [tomcat-coyote.jar:8.0.20] at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223) [tomcat-coyote.jar:8.0.20] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1558) [tomcat-coyote.jar:8.0.20] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1515) [tomcat-coyote.jar:8.0.20] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_40-internal] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_40-internal] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.0.20] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_40-internal] Caused by: java.lang.NullPointerException: null at com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl.synchronizeData(DeferredElementNSImpl.java:108) ~[na:1.8.0_40-internal] at com.sun.org.apache.xerces.internal.dom.ElementImpl.getNodeName(ElementImpl.java:122) ~[na:1.8.0_40-internal] at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:152) ~[na:1.8.0_40-internal] at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:230) ~[na:1.8.0_40-internal] at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:230) ~[na:1.8.0_40-internal] at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:230) ~[na:1.8.0_40-internal] at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:230) ~[na:1.8.0_40-internal] at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:230) ~[na:1.8.0_40-internal] at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:136) ~[na:1.8.0_40-internal] at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:98) ~[na:1.8.0_40-internal] at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:699) ~[na:1.8.0_40-internal] at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:743) ~[na:1.8.0_40-internal] ... 30 common frames omitted

    Spring JIRA | 10 months ago | JohannesB
    javax.xml.transform.TransformerException: java.lang.NullPointerException
  2. 0

    We have developed a couple of Spring Webservices deployed on Tomcat in a (stateless) Docker container that from time to time somehow fail to start correctly and return a stacktrace instead of the WSDL. Restarting the container will almost always fix it at the first attempt. The same issue was reported here by someone else: http://forum.spring.io/forum/spring-projects/web-services/122858-thread-safety-issue-with-requests-to-wsdl It looks like it is similar to bugs like these: * https://issues.apache.org/jira/browse/XERCESJ-211 * https://netbeans.org/bugzilla/show_bug.cgi?id=111862#c15 Below the complete stacktrace: 08:14:35.378 [http-nio-8080-exec-1] DEBUG o.s.w.t.h.MessageDispatcherServlet - Could not complete request javax.xml.transform.TransformerException: java.lang.NullPointerException at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:752) ~[na:1.8.0_40-internal] at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:357) ~[na:1.8.0_40-internal] at org.springframework.ws.transport.http.WsdlDefinitionHandlerAdapter.handle(WsdlDefinitionHandlerAdapter.java:144) ~[spring-ws-core-2.2.0.RELEASE.jar:2.2.0.RELEASE] at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:285) ~[spring-ws-core-2.2.0.RELEASE.jar:2.2.0.RELEASE] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961) [spring-webmvc-4.0.5.RELEASE.jar:4.0.5.RELEASE] at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852) [spring-webmvc-4.0.5.RELEASE.jar:4.0.5.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:618) [servlet-api.jar:na] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837) [spring-webmvc-4.0.5.RELEASE.jar:4.0.5.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) [servlet-api.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291) [catalina.jar:8.0.20] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.20] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-websocket.jar:8.0.20] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [catalina.jar:8.0.20] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.20] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) [catalina.jar:8.0.20] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [catalina.jar:8.0.20] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) [catalina.jar:8.0.20] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) [catalina.jar:8.0.20] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [catalina.jar:8.0.20] at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610) [catalina.jar:8.0.20] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [catalina.jar:8.0.20] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:516) [catalina.jar:8.0.20] at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1086) [tomcat-coyote.jar:8.0.20] at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:659) [tomcat-coyote.jar:8.0.20] at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223) [tomcat-coyote.jar:8.0.20] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1558) [tomcat-coyote.jar:8.0.20] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1515) [tomcat-coyote.jar:8.0.20] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_40-internal] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_40-internal] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.0.20] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_40-internal] Caused by: java.lang.NullPointerException: null at com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl.synchronizeData(DeferredElementNSImpl.java:108) ~[na:1.8.0_40-internal] at com.sun.org.apache.xerces.internal.dom.ElementImpl.getNodeName(ElementImpl.java:122) ~[na:1.8.0_40-internal] at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:152) ~[na:1.8.0_40-internal] at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:230) ~[na:1.8.0_40-internal] at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:230) ~[na:1.8.0_40-internal] at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:230) ~[na:1.8.0_40-internal] at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:230) ~[na:1.8.0_40-internal] at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:230) ~[na:1.8.0_40-internal] at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:136) ~[na:1.8.0_40-internal] at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:98) ~[na:1.8.0_40-internal] at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:699) ~[na:1.8.0_40-internal] at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:743) ~[na:1.8.0_40-internal] ... 30 common frames omitted

    Spring JIRA | 10 months ago | JohannesB
    javax.xml.transform.TransformerException: java.lang.NullPointerException
  3. 0

    Problem generating pdfs with acts_as_flying_saucer

    Stack Overflow | 6 years ago | Max Williams
    org.xhtmlrenderer.util.XRRuntimeException: Can't load the XML resource (using TRaX transformer). org.xml.sax.SAXParseException: Premature end of file.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Reference is not allowed in prolog

    Stack Overflow | 2 years ago | sunleo
    org.xhtmlrenderer.util.XRRuntimeException: Can't load the XML resource (using TRaX transformer). org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 2; Reference is not allowed in prolog.
  6. 0

    not generating pdf from http website url

    dolinked.com | 1 year ago
    org.xhtmlrenderer.util.XRRuntimeException: Can't load the XML resource (using TRaX transformer). org.xml.sax.SAXParseException; lineNumber: 12; columnNumber: 71; The element type "SCRIPT" must be terminated by the matching end-tag "</SCRIPT>".

  1. Tahir 1 times, last 4 months ago
14 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NullPointerException

    null

    at com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl.synchronizeData()
  2. Java RT
    TransformerImpl.transform
    1. com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl.synchronizeData(DeferredElementNSImpl.java:108)[na:1.8.0_40-internal]
    2. com.sun.org.apache.xerces.internal.dom.ElementImpl.getNodeName(ElementImpl.java:122)[na:1.8.0_40-internal]
    3. com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:152)[na:1.8.0_40-internal]
    4. com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:230)[na:1.8.0_40-internal]
    5. com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:230)[na:1.8.0_40-internal]
    6. com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:230)[na:1.8.0_40-internal]
    7. com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:230)[na:1.8.0_40-internal]
    8. com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:230)[na:1.8.0_40-internal]
    9. com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:136)[na:1.8.0_40-internal]
    10. com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:98)[na:1.8.0_40-internal]
    11. com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:699)[na:1.8.0_40-internal]
    12. com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:743)[na:1.8.0_40-internal]
    13. com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:357)[na:1.8.0_40-internal]
    13 frames
  3. Spring WS Core
    MessageDispatcherServlet.doService
    1. org.springframework.ws.transport.http.WsdlDefinitionHandlerAdapter.handle(WsdlDefinitionHandlerAdapter.java:144)[spring-ws-core-2.2.0.RELEASE.jar:2.2.0.RELEASE]
    2. org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:285)[spring-ws-core-2.2.0.RELEASE.jar:2.2.0.RELEASE]
    2 frames
  4. Spring MVC
    FrameworkServlet.doGet
    1. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)[spring-webmvc-4.0.5.RELEASE.jar:4.0.5.RELEASE]
    2. org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)[spring-webmvc-4.0.5.RELEASE.jar:4.0.5.RELEASE]
    2 frames
  5. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:618)[servlet-api.jar:na]
    1 frame
  6. Spring MVC
    FrameworkServlet.service
    1. org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)[spring-webmvc-4.0.5.RELEASE.jar:4.0.5.RELEASE]
    1 frame
  7. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:725)[servlet-api.jar:na]
    1 frame
  8. Glassfish Core
    ApplicationFilterChain.doFilter
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)[catalina.jar:8.0.20]
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)[catalina.jar:8.0.20]
    2 frames
  9. Tomcat WS
    WsFilter.doFilter
    1. org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)[tomcat-websocket.jar:8.0.20]
    1 frame
  10. Glassfish Core
    CoyoteAdapter.service
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)[catalina.jar:8.0.20]
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)[catalina.jar:8.0.20]
    3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)[catalina.jar:8.0.20]
    4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)[catalina.jar:8.0.20]
    5. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)[catalina.jar:8.0.20]
    6. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)[catalina.jar:8.0.20]
    7. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)[catalina.jar:8.0.20]
    8. org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)[catalina.jar:8.0.20]
    9. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)[catalina.jar:8.0.20]
    10. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:516)[catalina.jar:8.0.20]
    10 frames
  11. Grizzly HTTP
    NioEndpoint$SocketProcessor.run
    1. org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1086)[tomcat-coyote.jar:8.0.20]
    2. org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:659)[tomcat-coyote.jar:8.0.20]
    3. org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223)[tomcat-coyote.jar:8.0.20]
    4. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1558)[tomcat-coyote.jar:8.0.20]
    5. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1515)[tomcat-coyote.jar:8.0.20]
    5 frames
  12. Java RT
    ThreadPoolExecutor$Worker.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0_40-internal]
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_40-internal]
    2 frames
  13. Tomcat Util
    TaskThread$WrappingRunnable.run
    1. org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)[tomcat-util.jar:8.0.20]
    1 frame
  14. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:745)[na:1.8.0_40-internal]
    1 frame