Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7392

WS-RM: Refresh wsrm:Identifier after service reconnect

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1.7, 3.1.10
    • 3.1.12, 3.2.0
    • WS-* Components
    • None
    • Unknown

    Description

      Another scenario of normal ws-rm traffic, service stops and restarts a bit later. Client keeps sending messages with the known sequence Identifier. The service that just started doesn't know it so it will throw and exception like below:

      2017-06-02 22:56:55,590 | INFO  | ion(3)-127.0.0.1 | REQ_OUT                          | 37 - org.apache.cxf.cxf-rt-features-logging - 3.1.7 | <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
        <soap:Header>
          <Action xmlns="http://www.w3.org/2005/08/addressing">http://demo.apifocal.org/greeter/Greeter/greetMeRequest</Action>
          <MessageID xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:b4c5ed21-3d98-415c-b79a-cb5c253f0e92</MessageID>
          <To xmlns="http://www.w3.org/2005/08/addressing">http://localhost:8181/cxf/greeter-wsrm</To>
          <ReplyTo xmlns="http://www.w3.org/2005/08/addressing">
            <Address>http://www.w3.org/2005/08/addressing/anonymous</Address>
          </ReplyTo>
          <wsrm:Sequence xmlns:ns2="http://www.w3.org/2005/08/addressing" xmlns:wsrm="http://docs.oasis-open.org/ws-rx/wsrm/200702" soap:mustUnderstand="1">
            <wsrm:Identifier>urn:uuid:e4cc49cd-0da2-4f23-acbf-a2896305cfda</wsrm:Identifier>
            <wsrm:MessageNumber>4</wsrm:MessageNumber>
          </wsrm:Sequence>
        </soap:Header>
        <soap:Body>
          <greetMe xmlns="http://demo.apifocal.org/greeter/types">
            <requestType>World3</requestType>
          </greetMe>
        </soap:Body>
      </soap:Envelope>
      
      2017-06-02 22:56:55,702 | INFO  | tp1621558749-111 | InstrumentationManagerImpl       | 40 - org.apache.cxf.cxf-rt-management - 3.1.7 | registering MBean org.apache.cxf:bus.id=org.apifocal.demo.wsrm.greeter-wsrm-cxf189207851,type=WSRM.Endpoint,service="{http://demo.apifocal.org/greeter/wsrm}GreeterService",port="{http://demo.apifocal.org/greeter/wsrm}GreeterPort",instance.id=953867382: javax.management.modelmbean.RequiredModelMBean@3ba3e4fc
      2017-06-02 22:56:55,704 | WARN  | tp1621558749-111 | AbstractRMInterceptor            | 33 - org.apache.cxf.cxf-core - 3.1.7 | Interceptor encountered a SequenceFault: Reason: The value of wsrm:Identifier is not a known Sequence identifier., code: {http://schemas.xmlsoap.org/soap/envelope/}Client, subCode: null.
      2017-06-02 22:56:55,704 | WARN  | tp1621558749-111 | PhaseInterceptorChain            | 33 - org.apache.cxf.cxf-core - 3.1.7 | Interceptor for {http://demo.apifocal.org/greeter/wsrm}GreeterService#{http://demo.apifocal.org/greeter}greetMe has thrown exception, unwinding now
      org.apache.cxf.binding.soap.SoapFault: The value of wsrm:Identifier is not a known Sequence identifier.
      	at org.apache.cxf.ws.rm.soap.SoapFaultFactory.createSoap11Fault(SoapFaultFactory.java:72)[45:org.apache.cxf.cxf-rt-ws-rm:3.1.7]
      	at org.apache.cxf.ws.rm.soap.SoapFaultFactory.createFault(SoapFaultFactory.java:62)[45:org.apache.cxf.cxf-rt-ws-rm:3.1.7]
      	at org.apache.cxf.ws.rm.AbstractRMInterceptor.handleMessage(AbstractRMInterceptor.java:97)[45:org.apache.cxf.cxf-rt-ws-rm:3.1.7]
      	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)[33:org.apache.cxf.cxf-core:3.1.7]
      	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)[33:org.apache.cxf.cxf-core:3.1.7]
      	at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:254)[41:org.apache.cxf.cxf-rt-transports-http:3.1.7]
      	at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)[41:org.apache.cxf.cxf-rt-transports-http:3.1.7]
      	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)[41:org.apache.cxf.cxf-rt-transports-http:3.1.7]
      	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)[41:org.apache.cxf.cxf-rt-transports-http:3.1.7]
      	at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:180)[41:org.apache.cxf.cxf-rt-transports-http:3.1.7]
      	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:299)[41:org.apache.cxf.cxf-rt-transports-http:3.1.7]
      	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:218)[41:org.apache.cxf.cxf-rt-transports-http:3.1.7]
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)[17:javax.servlet-api:3.1.0]
      	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:274)[41:org.apache.cxf.cxf-rt-transports-http:3.1.7]
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)[108:org.eclipse.jetty.servlet:9.2.19.v20160908]
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)[108:org.eclipse.jetty.servlet:9.2.19.v20160908]
      	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71)[144:org.ops4j.pax.web.pax-web-jetty:4.3.0]
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[107:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)[106:org.eclipse.jetty.security:9.2.19.v20160908]
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)[107:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)[107:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:287)[144:org.ops4j.pax.web.pax-web-jetty:4.3.0]
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)[108:org.eclipse.jetty.servlet:9.2.19.v20160908]
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)[107:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)[107:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[107:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)[144:org.ops4j.pax.web.pax-web-jetty:4.3.0]
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[107:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.server.Server.handle(Server.java:499)[107:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)[107:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)[107:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)[99:org.eclipse.jetty.io:9.2.19.v20160908]
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[110:org.eclipse.jetty.util:9.2.19.v20160908]
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[110:org.eclipse.jetty.util:9.2.19.v20160908]
      	at java.lang.Thread.run(Thread.java:748)[:1.8.0_131]
      Caused by: org.apache.cxf.ws.rm.SequenceFault: The value of wsrm:Identifier is not a known Sequence identifier.
      	at org.apache.cxf.ws.rm.SequenceFaultFactory.createUnknownSequenceFault(SequenceFaultFactory.java:44)[45:org.apache.cxf.cxf-rt-ws-rm:3.1.7]
      	at org.apache.cxf.ws.rm.Destination.acknowledge(Destination.java:166)[45:org.apache.cxf.cxf-rt-ws-rm:3.1.7]
      	at org.apache.cxf.ws.rm.RMInInterceptor.processSequence(RMInInterceptor.java:265)[45:org.apache.cxf.cxf-rt-ws-rm:3.1.7]
      	at org.apache.cxf.ws.rm.RMInInterceptor.handle(RMInInterceptor.java:195)[45:org.apache.cxf.cxf-rt-ws-rm:3.1.7]
      	at org.apache.cxf.ws.rm.AbstractRMInterceptor.handleMessage(AbstractRMInterceptor.java:83)[45:org.apache.cxf.cxf-rt-ws-rm:3.1.7]
      	... 32 more
      2017-06-02 22:56:55,707 | WARN  | tp1621558749-111 | RMCaptureOutInterceptor          | 33 - org.apache.cxf.cxf-core - 3.1.7 | Not ensuring reliability for the transmission of a runtime fault.
      2017-06-02 22:56:55,710 | WARN  | tp1621558749-111 | ServletHandler                   | 110 - org.eclipse.jetty.util - 9.2.19.v20160908 | Error for /cxf/greeter-wsrm
      javax.xml.transform.TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found
      	at javax.xml.transform.TransformerFactory.newInstance(TransformerFactory.java:121)[:2.7.0]
      	at com.sun.xml.bind.v2.util.XmlFactory.createTransformerFactory(XmlFactory.java:172)
      	at com.sun.xml.bind.v2.runtime.JAXBContextImpl.createTransformer(JAXBContextImpl.java:715)
      	at com.sun.xml.bind.v2.runtime.XMLSerializer.getIdentityTransformer(XMLSerializer.java:813)
      	at com.sun.xml.bind.v2.runtime.XMLSerializer.writeDom(XMLSerializer.java:805)
      	at com.sun.xml.bind.v2.runtime.property.ArrayReferenceNodeProperty.serializeListBody(ArrayReferenceNodeProperty.java:116)
      	at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERProperty.java:159)
      	at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:360)
      	at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:696)
      	at com.sun.xml.bind.v2.runtime.property.SingleElementNodeProperty.serializeBody(SingleElementNodeProperty.java:158)
      	at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:360)
      	at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:696)
      	at com.sun.xml.bind.v2.runtime.property.SingleElementNodeProperty.serializeBody(SingleElementNodeProperty.java:158)
      	at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:160)
      	at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementBeanInfoImpl.java:130)
      	at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeBody(ElementBeanInfoImpl.java:332)
      	at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBeanInfoImpl.java:339)
      	at com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBeanInfoImpl.java:75)
      	at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:494)
      	at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:323)
      	at com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:251)
      	at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:145)
      	at org.apache.cxf.ws.rm.EncoderDecoder11Impl.buildHeaderFault(EncoderDecoder11Impl.java:152)
      	at org.apache.cxf.ws.rm.EncoderDecoder.buildHeaderFault(EncoderDecoder.java:166)
      	at org.apache.cxf.ws.rm.soap.RMSoapOutInterceptor.encodeFault(RMSoapOutInterceptor.java:174)
      	at org.apache.cxf.ws.rm.soap.RMSoapOutInterceptor.encode(RMSoapOutInterceptor.java:114)
      	at org.apache.cxf.ws.rm.soap.RMSoapOutInterceptor.handleMessage(RMSoapOutInterceptor.java:99)
      	at org.apache.cxf.ws.rm.soap.RMSoapOutInterceptor.handleMessage(RMSoapOutInterceptor.java:61)
      	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)[33:org.apache.cxf.cxf-core:3.1.7]
      	at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:112)[33:org.apache.cxf.cxf-core:3.1.7]
      	at org.apache.cxf.phase.PhaseInterceptorChain.wrapExceptionAsFault(PhaseInterceptorChain.java:366)[33:org.apache.cxf.cxf-core:3.1.7]
      	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:324)[33:org.apache.cxf.cxf-core:3.1.7]
      	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)[33:org.apache.cxf.cxf-core:3.1.7]
      	at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:254)[41:org.apache.cxf.cxf-rt-transports-http:3.1.7]
      	at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)[41:org.apache.cxf.cxf-rt-transports-http:3.1.7]
      	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)[41:org.apache.cxf.cxf-rt-transports-http:3.1.7]
      	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)[41:org.apache.cxf.cxf-rt-transports-http:3.1.7]
      	at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:180)[41:org.apache.cxf.cxf-rt-transports-http:3.1.7]
      	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:299)[41:org.apache.cxf.cxf-rt-transports-http:3.1.7]
      	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:218)[41:org.apache.cxf.cxf-rt-transports-http:3.1.7]
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)[17:javax.servlet-api:3.1.0]
      	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:274)[41:org.apache.cxf.cxf-rt-transports-http:3.1.7]
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)[108:org.eclipse.jetty.servlet:9.2.19.v20160908]
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)[108:org.eclipse.jetty.servlet:9.2.19.v20160908]
      	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71)[144:org.ops4j.pax.web.pax-web-jetty:4.3.0]
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[107:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)[106:org.eclipse.jetty.security:9.2.19.v20160908]
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)[107:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)[107:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:287)[144:org.ops4j.pax.web.pax-web-jetty:4.3.0]
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)[108:org.eclipse.jetty.servlet:9.2.19.v20160908]
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)[107:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)[107:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[107:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)[144:org.ops4j.pax.web.pax-web-jetty:4.3.0]
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[107:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.server.Server.handle(Server.java:499)[107:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)[107:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)[107:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)[99:org.eclipse.jetty.io:9.2.19.v20160908]
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[110:org.eclipse.jetty.util:9.2.19.v20160908]
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[110:org.eclipse.jetty.util:9.2.19.v20160908]
      	at java.lang.Thread.run(Thread.java:748)[:1.8.0_131]
      2017-06-02 22:56:55,725 | WARN  | ion(3)-127.0.0.1 | PhaseInterceptorChain            | 33 - org.apache.cxf.cxf-core - 3.1.7 | Interceptor for {http://demo.apifocal.org/greeter}GreeterService#{http://demo.apifocal.org/greeter}greetMe has thrown exception, unwinding now
      org.apache.cxf.interceptor.Fault: Response was of unexpected text/html ContentType.  Incoming portion of HTML stream: <html>
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
      <title>Error 500 Server Error</title>
      </head>
      <body><h2>HTTP ERROR 500</h2>
      <p>Problem accessing /cxf/greeter-wsrm. Reason:
      <pre>    Server Error</pre></p><h3>Caused by:</h3><pre>javax.xml.transform.TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found
      	at javax.xml.transform.TransformerFactory.newInstance(TransformerFactory.java:121)
      	at com.sun.xml.bind.v2.util.XmlFactory.createTransformerFactory(XmlFactory.java:172)
      	at com.sun.xml.bind.v2.runtime.JAXBContextImpl.createTransformer(JAXBContextImpl.java:715)
      	at com.sun.xml.bind.v2.runtime.XMLSerializer.getIdentityTransformer(XMLSerializer.java:813)
      	at com.sun.xml.bind.v2.runtime.XMLSerializer.writeDom(XMLSerializer.java:805)
      	at com.sun.xml.bind.v2.runtime.property.ArrayReferenceNodeProperty.serializeListBody(ArrayReferenceNodeProperty.java:116)
      
      [...]
      

      The fact that the fault the exception is thrown is ok. I think the problem is that it's caught somewhere and sent back as html which messes up the whole stack. Normally the client should be able to catch this and do another CreateSequence out-of-band to get a new Identifier and resend, transparently for the client.

      I noticed this behavior when persistence was used, but I could reproduce it without persistence configured as well.

      Attachments

        Issue Links

          Activity

            People

              dkulp Daniel Kulp
              hadrian Hadrian Zbarcea
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: