Announcement Announcement Module
Collapse
No announcement yet.
Multiple Spring WS Applications running under the same web server (Tomcat, Resin) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Multiple Spring WS Applications running under the same web server (Tomcat, Resin)

    Hello,

    We are experiencing a very strange issue when running two (or more) instances of the same Spring WS under the same web server (Tomcat 6 or Resin 3.1). The purpose of having multiple same WS instances is that the server has a backend database for each customer (each WS server connecting to its own database). The strange behavior is the following:

    - If deploying just one WS application under the web server, everything works fine and as expected;
    - If deploying two identical WS applications under the web server, the first one that is accessed works fine but the other does not;

    Looking in the logs I see the endpoint is correctly identified, the response message is validated and then when the response message is sent back the following error appears:

    Jan 27, 2011 6:04:39 PM com.sun.xml.messaging.saaj.soap.MessageImpl saveChanges
    SEVERE: SAAJ0539: Unable to get header stream in saveChanges
    Jan 27, 2011 6:04:39 PM com.sun.xml.messaging.saaj.soap.MessageImpl saveChanges
    SEVERE: SAAJ0540: Error during saving a multipart message
    2011-01-27 18:04:39,326 DEBUG [org.springframework.ws.transport.http.MessageDispa tcherServlet] - Could not complete request
    org.springframework.ws.soap.saaj.SaajSoapMessageEx ception: Could not write message to OutputStream: Error during saving a multipart message; nested exception is com.sun.xml.messaging.saaj.SOAPExceptionImpl: Error during saving a multipart message
    at org.springframework.ws.soap.saaj.SaajSoapMessage.w riteTo(SaajSoapMessage.java:169)
    at org.springframework.ws.transport.AbstractWebServic eConnection.send(AbstractWebServiceConnection.java :45)
    at org.springframework.ws.transport.support.WebServic eMessageReceiverObjectSupport.handleConnection(Web ServiceMessageReceiverObjectSupport.java:97)
    at org.springframework.ws.transport.http.WebServiceMe ssageReceiverHandlerAdapter.handle(WebServiceMessa geReceiverHandlerAdapter.java:57)
    at org.springframework.ws.transport.http.MessageDispa tcherServlet.doService(MessageDispatcherServlet.ja va:230)
    at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:571)
    at org.springframework.web.servlet.FrameworkServlet.d oPost(FrameworkServlet.java:511)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:710)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:263)
    at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.process(Http11Protocol.java:584)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run( JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Error during saving a multipart message
    at com.sun.xml.messaging.saaj.soap.MessageImpl.saveCh anges(MessageImpl.java:1158)
    at org.springframework.ws.soap.saaj.Saaj13Implementat ion.writeTo(Saaj13Implementation.java:268)
    at org.springframework.ws.soap.saaj.SaajSoapMessage.w riteTo(SaajSoapMessage.java:165)
    ... 20 more
    Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to get header stream in saveChanges:
    at com.sun.xml.messaging.saaj.soap.MessageImpl.saveCh anges(MessageImpl.java:1135)
    ... 22 more
    Caused by: java.io.IOException: org.apache.xml.serializer.ToXMLSAXHandler
    at com.sun.xml.messaging.saaj.soap.impl.EnvelopeImpl. output(EnvelopeImpl.java:329)
    at com.sun.xml.messaging.saaj.soap.impl.EnvelopeImpl. output(EnvelopeImpl.java:340)
    at com.sun.xml.messaging.saaj.soap.SOAPPartImpl.getCo ntentAsStream(SOAPPartImpl.java:336)
    at com.sun.xml.messaging.saaj.soap.MessageImpl.getHea derBytes(MessageImpl.java:979)
    at com.sun.xml.messaging.saaj.soap.MessageImpl.saveCh anges(MessageImpl.java:1130)
    ... 22 more


    I need to mention that I have already tried putting a copy of Xerces and Xalan in the endorsed folder as I observed it was advised for such type of exceptions (when using java 6) but without any result.
    Since the environment works fine in certain situations I suspect it might be something else.

    Do you have any ideas on what might be the issue?

    Thanks,
    Horatiu Dan
Working...
X