Announcement Announcement Module
Collapse
No announcement yet.
SaajXmlReader NullPointerException / jboss / mac in interceptors Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • SaajXmlReader NullPointerException / jboss / mac in interceptors

    Hi,
    I need help to deploy my web service in jboss on mac (10.5.2).

    When I 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>

    I have no problems in the following configurations:
    redhat linux / jboss 4.2.2GA
    Mac OSX 10.5.2 / Tomcat 5.5
    Mac OSX 10.5.2 / Jetty

    Any ideas?

    Thank you very much for help.

    Jacques

  • #2
    Still the problem is not solved, I worked around by disabling the inner beans
    PayloadLoggingInterceptor and PayloadValidatingInterceptor

    Comment


    • #3
      That NPE sounds like something we should fix. Could you please file a JIRA issue?

      thanks!

      Comment


      • #4
        Filed Jira issue: SWS-335

        Comment


        • #5
          Thanks, I will take a look at it for 1.5.1.

          Comment

          Working...
          X