[ https://issues.apache.org/jira/browse/CXF-6145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14239673#comment-14239673 ]
Guopu Wu commented on CXF-6145: ------------------------------- Proposed fix lies in org.apache.cxf.ws.rm.DestinationSequence - Replace line 181 with following if block to not schedule the Acknowledgement which had already been sent if (null == rmps.getCloseSequence()) { scheduleAcknowledgement(cfg.getAcknowledgementIntervalTime()); } The function would look like - public void acknowledge(Message message) throws SequenceFault { RMProperties rmps = RMContextUtils.retrieveRMProperties(message, false); SequenceType st = rmps.getSequence(); ... RMEndpoint reliableEndpoint = destination.getReliableEndpoint(); RMConfiguration cfg = reliableEndpoint.getConfiguration(); if (null == rmps.getCloseSequence()) { scheduleAcknowledgement(cfg.getAcknowledgementIntervalTime()); } long inactivityTimeout = cfg.getInactivityTimeoutTime(); scheduleSequenceTermination(inactivityTimeout); } > WS-RM demo server throws exception > ---------------------------------- > > Key: CXF-6145 > URL: https://issues.apache.org/jira/browse/CXF-6145 > Project: CXF > Issue Type: Bug > Components: WS-* Components > Affects Versions: 3.0.2 > Environment: Windows JDK 6 > Reporter: Guopu Wu > > Dec 8, 2014 10:04:56 AM org.apache.cxf.ws.rm.Proxy invoke > SEVERE: Failed to send RM protocol message > {http://schemas.xmlsoap.org/ws/2005/02/rm}SequenceAcknowledgement. > org.apache.cxf.interceptor.Fault: Could not send Message. > at > org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64) > at > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307) > at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:514) > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:423) > at org.apache.cxf.ws.rm.Proxy.invoke(Proxy.java:313) > at org.apache.cxf.ws.rm.Proxy.invoke(Proxy.java:330) > at org.apache.cxf.ws.rm.Proxy.invoke(Proxy.java:334) > at org.apache.cxf.ws.rm.Proxy.acknowledge(Proxy.java:90) > at > org.apache.cxf.ws.rm.DestinationSequence$DeferredAcknowledgment.run(DestinationSequence.java:469) > at java.util.TimerThread.mainLoop(Timer.java:512) > at java.util.TimerThread.run(Timer.java:462) > Caused by: java.net.ConnectException: ConnectException invoking > http://localhost:9990/decoupled_endpoint: Connection refused: connect > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) > at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > at > org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1359) > at > org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1343) > at > org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:56) > at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:215) > at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) > at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:638) > at > org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) > ... 10 more > Caused by: java.net.ConnectException: Connection refused: connect > at java.net.PlainSocketImpl.socketConnect(Native Method) > at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351) > at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213) > at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200) > at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) > at java.net.Socket.connect(Socket.java:529) > at sun.net.NetworkClient.doConnect(NetworkClient.java:158) > at sun.net.www.http.HttpClient.openServer(HttpClient.java:411) > at sun.net.www.http.HttpClient.openServer(HttpClient.java:525) > at sun.net.www.http.HttpClient.<init>(HttpClient.java:208) > at sun.net.www.http.HttpClient.New(HttpClient.java:291) > at sun.net.www.http.HttpClient.New(HttpClient.java:310) > at > sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:987) > at > sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:923) > at > sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:841) > at > sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1031) > at > org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.setupWrappedStream(URLConnectionHTTPConduit.java:174) > at > org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCaching(HTTPConduit.java:1302) > at > org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.onFirstWrite(HTTPConduit.java:1258) > at > org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.onFirstWrite(URLConnectionHTTPConduit.java:201) > at > org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:47) > at > org.apache.cxf.io.AbstractThresholdOutputStream.write(AbstractThresholdOutputStream.java:69) > at > org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1315) > ... 15 more -- This message was sent by Atlassian JIRA (v6.3.4#6332)