java.lang.NullPointerException

Spring JIRA | Jacques Couzteau | 9 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    run my app in the jboss environment (JBoss 4.2.2GA) I always fail with nullpointer exceptions in one of my payload interceptors (PayloadLoggingInterceptor, PayloadValidatingInterceptor). When I have validation turned on, I fail in xerces, if it's off I fail the logger in xalan. See stacktraces, failure in validator: Code: java.lang.NullPointerException at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleText(SaajXmlReader.java:187) at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleNode(SaajXmlReader.java:127) at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleElement(SaajXmlReader.java:150) at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleNode(SaajXmlReader.java:123) at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleElement(SaajXmlReader.java:150) at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleNode(SaajXmlReader.java:123) at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleElement(SaajXmlReader.java:150) at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleNode(SaajXmlReader.java:123) at org.springframework.ws.soap.saaj.support.SaajXmlReader.parse(SaajXmlReader.java:115) at org.springframework.ws.soap.saaj.support.SaajXmlReader.parse(SaajXmlReader.java:96) at org.apache.xerces.jaxp.validation.ValidatorHandlerImpl.validate(Unknown Source) at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source) at javax.xml.validation.Validator.validate(Unknown Source) at org.springframework.xml.validation.Jaxp13ValidatorFactory$Jaxp13Validator.validate(Jaxp13ValidatorFactory.java:61) at org.springframework.ws.server.endpoint.interceptor.AbstractValidatingInterceptor.handleResponse(AbstractValidatingInterceptor.java:185) at org.springframework.ws.server.MessageDispatcher.triggerHandleResponse(MessageDispatcher.java:341) at org.springframework.ws.server.MessageDispatcher.dispatch(MessageDispatcher.java:218) at org.springframework.ws.server.MessageDispatcher.receive(MessageDispatcher.java:162) at org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:87) at org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:57) at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:197) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446) failure in logger: Code: 14:57:46,159 INFO [STDOUT] 2008-04-07 14:57:46,158 WARN [org.springframework.ws.soap.server.SoapMessageDispatcher] - Endpoint invocation resulted in exception - responding with SOAP Fault java.lang.NullPointerException at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleText(SaajXmlReader.java:187) at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleNode(SaajXmlReader.java:127) at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleElement(SaajXmlReader.java:150) at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleNode(SaajXmlReader.java:123) at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleElement(SaajXmlReader.java:150) at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleNode(SaajXmlReader.java:123) at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleElement(SaajXmlReader.java:150) at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleNode(SaajXmlReader.java:123) at org.springframework.ws.soap.saaj.support.SaajXmlReader.parse(SaajXmlReader.java:115) at org.springframework.ws.soap.saaj.support.SaajXmlReader.parse(SaajXmlReader.java:96) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485) at org.springframework.ws.server.endpoint.1.logMessageSource(AbstractLoggingInterceptor.java:102) at org.springframework.ws.server.endpoint.AbstractLoggingInterceptor.handleResponse(AbstractLoggingInterceptor.java:81) at org.springframework.ws.server.MessageDispatcher.triggerHandleResponse(MessageDispatcher.java:341) at org.springframework.ws.server.MessageDispatcher.dispatch(MessageDispatcher.java:218) at org.springframework.ws.server.MessageDispatcher.receive(MessageDispatcher.java:162) at org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:87) at org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:57) at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:197) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at ... snip my bean looks like this, Code: <bean class="org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping"> <property name="interceptors"> <list> <bean class="org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor"/> <bean class="org.springframework.ws.soap.server.endpoint.interceptor.PayloadValidatingInterceptor"> <property name="schema" value="/WEB-INF/xsd/codexws.xsd"/> <property name="validateRequest" value="true"/> <property name="validateResponse" value="true"/> </bean> </list> </property> <property name="order" value="1"/> </bean> I have explicitly defined the message factory: Code: <bean id="messageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory"> <description> define default message factory to avoid problems with JBoss' built in factory. See http://static.springframework.org/spring-ws/site/faq.html#saaj-jboss </description> <property name="messageFactory"> <bean class="com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl"> </bean> </property> </bean>

    Spring JIRA | 9 years ago | Jacques Couzteau
    java.lang.NullPointerException
  2. 0

    run my app in the jboss environment (JBoss 4.2.2GA) I always fail with nullpointer exceptions in one of my payload interceptors (PayloadLoggingInterceptor, PayloadValidatingInterceptor). When I have validation turned on, I fail in xerces, if it's off I fail the logger in xalan. See stacktraces, failure in validator: Code: java.lang.NullPointerException at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleText(SaajXmlReader.java:187) at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleNode(SaajXmlReader.java:127) at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleElement(SaajXmlReader.java:150) at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleNode(SaajXmlReader.java:123) at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleElement(SaajXmlReader.java:150) at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleNode(SaajXmlReader.java:123) at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleElement(SaajXmlReader.java:150) at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleNode(SaajXmlReader.java:123) at org.springframework.ws.soap.saaj.support.SaajXmlReader.parse(SaajXmlReader.java:115) at org.springframework.ws.soap.saaj.support.SaajXmlReader.parse(SaajXmlReader.java:96) at org.apache.xerces.jaxp.validation.ValidatorHandlerImpl.validate(Unknown Source) at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source) at javax.xml.validation.Validator.validate(Unknown Source) at org.springframework.xml.validation.Jaxp13ValidatorFactory$Jaxp13Validator.validate(Jaxp13ValidatorFactory.java:61) at org.springframework.ws.server.endpoint.interceptor.AbstractValidatingInterceptor.handleResponse(AbstractValidatingInterceptor.java:185) at org.springframework.ws.server.MessageDispatcher.triggerHandleResponse(MessageDispatcher.java:341) at org.springframework.ws.server.MessageDispatcher.dispatch(MessageDispatcher.java:218) at org.springframework.ws.server.MessageDispatcher.receive(MessageDispatcher.java:162) at org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:87) at org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:57) at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:197) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446) failure in logger: Code: 14:57:46,159 INFO [STDOUT] 2008-04-07 14:57:46,158 WARN [org.springframework.ws.soap.server.SoapMessageDispatcher] - Endpoint invocation resulted in exception - responding with SOAP Fault java.lang.NullPointerException at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleText(SaajXmlReader.java:187) at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleNode(SaajXmlReader.java:127) at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleElement(SaajXmlReader.java:150) at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleNode(SaajXmlReader.java:123) at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleElement(SaajXmlReader.java:150) at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleNode(SaajXmlReader.java:123) at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleElement(SaajXmlReader.java:150) at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleNode(SaajXmlReader.java:123) at org.springframework.ws.soap.saaj.support.SaajXmlReader.parse(SaajXmlReader.java:115) at org.springframework.ws.soap.saaj.support.SaajXmlReader.parse(SaajXmlReader.java:96) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485) at org.springframework.ws.server.endpoint.1.logMessageSource(AbstractLoggingInterceptor.java:102) at org.springframework.ws.server.endpoint.AbstractLoggingInterceptor.handleResponse(AbstractLoggingInterceptor.java:81) at org.springframework.ws.server.MessageDispatcher.triggerHandleResponse(MessageDispatcher.java:341) at org.springframework.ws.server.MessageDispatcher.dispatch(MessageDispatcher.java:218) at org.springframework.ws.server.MessageDispatcher.receive(MessageDispatcher.java:162) at org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:87) at org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:57) at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:197) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at ... snip my bean looks like this, Code: <bean class="org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping"> <property name="interceptors"> <list> <bean class="org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor"/> <bean class="org.springframework.ws.soap.server.endpoint.interceptor.PayloadValidatingInterceptor"> <property name="schema" value="/WEB-INF/xsd/codexws.xsd"/> <property name="validateRequest" value="true"/> <property name="validateResponse" value="true"/> </bean> </list> </property> <property name="order" value="1"/> </bean> I have explicitly defined the message factory: Code: <bean id="messageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory"> <description> define default message factory to avoid problems with JBoss' built in factory. See http://static.springframework.org/spring-ws/site/faq.html#saaj-jboss </description> <property name="messageFactory"> <bean class="com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl"> </bean> </property> </bean>

    Spring JIRA | 9 years ago | Jacques Couzteau
    java.lang.NullPointerException
  3. 0

    db:: 4.34::WSDL 2 Java : At Runtime f8

    hivmr.com | 1 year ago
    java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    XML Transform error

    Oracle Community | 1 decade ago | 807607
    java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at org.springframework.ws.soap.saaj.support.SaajXmlReader.handleText()
    2. Spring WS Core
      SaajXmlReader.parse
      1. org.springframework.ws.soap.saaj.support.SaajXmlReader.handleText(SaajXmlReader.java:187)
      2. org.springframework.ws.soap.saaj.support.SaajXmlReader.handleNode(SaajXmlReader.java:127)
      3. org.springframework.ws.soap.saaj.support.SaajXmlReader.handleElement(SaajXmlReader.java:150)
      4. org.springframework.ws.soap.saaj.support.SaajXmlReader.handleNode(SaajXmlReader.java:123)
      5. org.springframework.ws.soap.saaj.support.SaajXmlReader.handleElement(SaajXmlReader.java:150)
      6. org.springframework.ws.soap.saaj.support.SaajXmlReader.handleNode(SaajXmlReader.java:123)
      7. org.springframework.ws.soap.saaj.support.SaajXmlReader.handleElement(SaajXmlReader.java:150)
      8. org.springframework.ws.soap.saaj.support.SaajXmlReader.handleNode(SaajXmlReader.java:123)
      9. org.springframework.ws.soap.saaj.support.SaajXmlReader.parse(SaajXmlReader.java:115)
      10. org.springframework.ws.soap.saaj.support.SaajXmlReader.parse(SaajXmlReader.java:96)
      10 frames
    3. Xalan Java
      TransformerIdentityImpl.transform
      1. org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)
      1 frame