You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by GitBox <gi...@apache.org> on 2019/12/28 17:10:19 UTC

[GitHub] [cxf] reda-alaoui opened a new pull request #618: On connection refused, XSLTOutInterceptor mangles the error

reda-alaoui opened a new pull request #618: On connection refused, XSLTOutInterceptor mangles the error
URL: https://github.com/apache/cxf/pull/618
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [cxf] reda-alaoui commented on a change in pull request #618: On connection refused, XSLTOutInterceptor mangles the error

Posted by GitBox <gi...@apache.org>.
reda-alaoui commented on a change in pull request #618: On connection refused, XSLTOutInterceptor mangles the error
URL: https://github.com/apache/cxf/pull/618#discussion_r361858179
 
 

 ##########
 File path: core/src/main/java/org/apache/cxf/feature/transform/XSLTOutInterceptor.java
 ##########
 @@ -169,7 +169,7 @@ public void onClose(CachedOutputStream wrapper) {
             } finally {
                 try {
                     origStream.close();
-                } catch (IOException e) {
+                } catch (Exception e) {
 
 Review comment:
   This test case reproduce a production case where the thrown exception is:
   
   ```java.lang.IllegalStateException: IllegalStateException invoking http://127.0.0.1:37907/: Already connected
   	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
   	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
   	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
   	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1400)
   	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1389)
   	at org.apache.cxf.feature.transform.XSLTOutInterceptor$XSLTCachedOutputStreamCallback.onClose(XSLTOutInterceptor.java:171)
   	at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:219)
   	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
   	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:671)
   	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:63)
   	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
   	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
   	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:441)
   	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:356)
   	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:314)
   	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
   	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:140)
   	at com.sun.proxy.$Proxy46.echo(Unknown Source)
   	at org.apache.cxf.systest.transform.feature.TransformFeatureTest.testClientOutTransformationOnConnectionRefused(TransformFeatureTest.java:106)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
   	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
   	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
   	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
   	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
   	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
   	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
   	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
   	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
   	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
   	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
   	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
   	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
   	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
   	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
   	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
   	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
   	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
   	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
   	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
   	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:230)
   	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:58)
   Caused by: java.lang.IllegalStateException: Already connected
   	at java.base/sun.net.www.protocol.http.HttpURLConnection.setRequestProperty(HttpURLConnection.java:3165)
   	at org.apache.cxf.transport.http.Headers.setProtocolHeadersInConnection(Headers.java:360)
   	at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.setProtocolHeaders(URLConnectionHTTPConduit.java:319)
   	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCaching(HTTPConduit.java:1324)
   	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1360)
   	... 39 more
   ```
   
   You can debug the test with a breakpoint at the commented line to see it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [cxf] reda-alaoui commented on a change in pull request #618: On connection refused, XSLTOutInterceptor mangles the error

Posted by GitBox <gi...@apache.org>.
reda-alaoui commented on a change in pull request #618: On connection refused, XSLTOutInterceptor mangles the error
URL: https://github.com/apache/cxf/pull/618#discussion_r361858179
 
 

 ##########
 File path: core/src/main/java/org/apache/cxf/feature/transform/XSLTOutInterceptor.java
 ##########
 @@ -169,7 +169,7 @@ public void onClose(CachedOutputStream wrapper) {
             } finally {
                 try {
                     origStream.close();
-                } catch (IOException e) {
+                } catch (Exception e) {
 
 Review comment:
   This test case reproduce a production case where the exception at this point is:
   
   ```java.lang.IllegalStateException: IllegalStateException invoking http://127.0.0.1:37907/: Already connected
   	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
   	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
   	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
   	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1400)
   	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1389)
   	at org.apache.cxf.feature.transform.XSLTOutInterceptor$XSLTCachedOutputStreamCallback.onClose(XSLTOutInterceptor.java:171)
   	at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:219)
   	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
   	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:671)
   	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:63)
   	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
   	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
   	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:441)
   	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:356)
   	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:314)
   	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
   	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:140)
   	at com.sun.proxy.$Proxy46.echo(Unknown Source)
   	at org.apache.cxf.systest.transform.feature.TransformFeatureTest.testClientOutTransformationOnConnectionRefused(TransformFeatureTest.java:106)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
   	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
   	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
   	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
   	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
   	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
   	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
   	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
   	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
   	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
   	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
   	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
   	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
   	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
   	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
   	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
   	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
   	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
   	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
   	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
   	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:230)
   	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:58)
   Caused by: java.lang.IllegalStateException: Already connected
   	at java.base/sun.net.www.protocol.http.HttpURLConnection.setRequestProperty(HttpURLConnection.java:3165)
   	at org.apache.cxf.transport.http.Headers.setProtocolHeadersInConnection(Headers.java:360)
   	at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.setProtocolHeaders(URLConnectionHTTPConduit.java:319)
   	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCaching(HTTPConduit.java:1324)
   	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1360)
   	... 39 more
   ```
   
   You can debug the test with a breakpoint at the commented line to see it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [cxf] reda-alaoui commented on a change in pull request #618: On connection refused, XSLTOutInterceptor mangles the error

Posted by GitBox <gi...@apache.org>.
reda-alaoui commented on a change in pull request #618: On connection refused, XSLTOutInterceptor mangles the error
URL: https://github.com/apache/cxf/pull/618#discussion_r361858179
 
 

 ##########
 File path: core/src/main/java/org/apache/cxf/feature/transform/XSLTOutInterceptor.java
 ##########
 @@ -169,7 +169,7 @@ public void onClose(CachedOutputStream wrapper) {
             } finally {
                 try {
                     origStream.close();
-                } catch (IOException e) {
+                } catch (Exception e) {
 
 Review comment:
   The added test reproduces a production issue where the exception at this point is:
   
   ```
   java.lang.IllegalStateException: IllegalStateException invoking http://127.0.0.1:37907/: Already connected
   	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
   	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
   	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
   	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1400)
   	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1389)
   	at org.apache.cxf.feature.transform.XSLTOutInterceptor$XSLTCachedOutputStreamCallback.onClose(XSLTOutInterceptor.java:171)
   	at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:219)
   	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
   	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:671)
   	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:63)
   	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
   	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
   	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:441)
   	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:356)
   	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:314)
   	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
   	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:140)
   	at com.sun.proxy.$Proxy46.echo(Unknown Source)
   	at org.apache.cxf.systest.transform.feature.TransformFeatureTest.testClientOutTransformationOnConnectionRefused(TransformFeatureTest.java:106)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
   	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
   	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
   	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
   	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
   	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
   	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
   	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
   	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
   	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
   	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
   	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
   	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
   	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
   	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
   	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
   	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
   	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
   	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
   	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
   	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:230)
   	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:58)
   Caused by: java.lang.IllegalStateException: Already connected
   	at java.base/sun.net.www.protocol.http.HttpURLConnection.setRequestProperty(HttpURLConnection.java:3165)
   	at org.apache.cxf.transport.http.Headers.setProtocolHeadersInConnection(Headers.java:360)
   	at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.setProtocolHeaders(URLConnectionHTTPConduit.java:319)
   	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCaching(HTTPConduit.java:1324)
   	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1360)
   	... 39 more
   ```
   
   You can debug the test with a breakpoint at the commented line to see it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [cxf] reda-alaoui commented on a change in pull request #618: On connection refused, XSLTOutInterceptor mangles the error

Posted by GitBox <gi...@apache.org>.
reda-alaoui commented on a change in pull request #618: On connection refused, XSLTOutInterceptor mangles the error
URL: https://github.com/apache/cxf/pull/618#discussion_r361858179
 
 

 ##########
 File path: core/src/main/java/org/apache/cxf/feature/transform/XSLTOutInterceptor.java
 ##########
 @@ -169,7 +169,7 @@ public void onClose(CachedOutputStream wrapper) {
             } finally {
                 try {
                     origStream.close();
-                } catch (IOException e) {
+                } catch (Exception e) {
 
 Review comment:
   This test case reproduces a production case where the exception at this point is:
   
   ```
   java.lang.IllegalStateException: IllegalStateException invoking http://127.0.0.1:37907/: Already connected
   	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
   	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
   	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
   	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1400)
   	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1389)
   	at org.apache.cxf.feature.transform.XSLTOutInterceptor$XSLTCachedOutputStreamCallback.onClose(XSLTOutInterceptor.java:171)
   	at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:219)
   	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
   	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:671)
   	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:63)
   	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
   	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
   	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:441)
   	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:356)
   	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:314)
   	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
   	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:140)
   	at com.sun.proxy.$Proxy46.echo(Unknown Source)
   	at org.apache.cxf.systest.transform.feature.TransformFeatureTest.testClientOutTransformationOnConnectionRefused(TransformFeatureTest.java:106)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
   	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
   	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
   	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
   	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
   	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
   	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
   	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
   	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
   	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
   	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
   	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
   	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
   	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
   	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
   	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
   	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
   	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
   	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
   	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
   	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:230)
   	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:58)
   Caused by: java.lang.IllegalStateException: Already connected
   	at java.base/sun.net.www.protocol.http.HttpURLConnection.setRequestProperty(HttpURLConnection.java:3165)
   	at org.apache.cxf.transport.http.Headers.setProtocolHeadersInConnection(Headers.java:360)
   	at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.setProtocolHeaders(URLConnectionHTTPConduit.java:319)
   	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCaching(HTTPConduit.java:1324)
   	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1360)
   	... 39 more
   ```
   
   You can debug the test with a breakpoint at the commented line to see it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [cxf] reda-alaoui commented on issue #618: On connection refused, XSLTOutInterceptor mangles the error

Posted by GitBox <gi...@apache.org>.
reda-alaoui commented on issue #618: On connection refused, XSLTOutInterceptor mangles the error
URL: https://github.com/apache/cxf/pull/618#issuecomment-569533578
 
 
   Thanks !

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [cxf] reta commented on issue #618: On connection refused, XSLTOutInterceptor mangles the error

Posted by GitBox <gi...@apache.org>.
reta commented on issue #618: On connection refused, XSLTOutInterceptor mangles the error
URL: https://github.com/apache/cxf/pull/618#issuecomment-569532294
 
 
   > 
   > 
   > The build failed on `org.apache.cxf.transport.jms.util.MessageListenerTest.testLocalTransaction`. But the same test is green on my computer.
   This test is a flaky one at the moment, unfortunately, nothing to worry about with respect to this PR.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [cxf] reda-alaoui commented on a change in pull request #618: On connection refused, XSLTOutInterceptor mangles the error

Posted by GitBox <gi...@apache.org>.
reda-alaoui commented on a change in pull request #618: On connection refused, XSLTOutInterceptor mangles the error
URL: https://github.com/apache/cxf/pull/618#discussion_r361858179
 
 

 ##########
 File path: core/src/main/java/org/apache/cxf/feature/transform/XSLTOutInterceptor.java
 ##########
 @@ -169,7 +169,7 @@ public void onClose(CachedOutputStream wrapper) {
             } finally {
                 try {
                     origStream.close();
-                } catch (IOException e) {
+                } catch (Exception e) {
 
 Review comment:
   This test case reproduce a production case where the exception at this point is:
   
   ```
   java.lang.IllegalStateException: IllegalStateException invoking http://127.0.0.1:37907/: Already connected
   	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
   	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
   	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
   	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1400)
   	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1389)
   	at org.apache.cxf.feature.transform.XSLTOutInterceptor$XSLTCachedOutputStreamCallback.onClose(XSLTOutInterceptor.java:171)
   	at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:219)
   	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
   	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:671)
   	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:63)
   	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
   	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
   	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:441)
   	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:356)
   	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:314)
   	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
   	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:140)
   	at com.sun.proxy.$Proxy46.echo(Unknown Source)
   	at org.apache.cxf.systest.transform.feature.TransformFeatureTest.testClientOutTransformationOnConnectionRefused(TransformFeatureTest.java:106)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
   	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
   	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
   	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
   	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
   	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
   	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
   	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
   	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
   	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
   	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
   	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
   	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
   	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
   	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
   	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
   	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
   	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
   	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
   	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
   	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:230)
   	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:58)
   Caused by: java.lang.IllegalStateException: Already connected
   	at java.base/sun.net.www.protocol.http.HttpURLConnection.setRequestProperty(HttpURLConnection.java:3165)
   	at org.apache.cxf.transport.http.Headers.setProtocolHeadersInConnection(Headers.java:360)
   	at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.setProtocolHeaders(URLConnectionHTTPConduit.java:319)
   	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCaching(HTTPConduit.java:1324)
   	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1360)
   	... 39 more
   ```
   
   You can debug the test with a breakpoint at the commented line to see it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [cxf] reta commented on a change in pull request #618: On connection refused, XSLTOutInterceptor mangles the error

Posted by GitBox <gi...@apache.org>.
reta commented on a change in pull request #618: On connection refused, XSLTOutInterceptor mangles the error
URL: https://github.com/apache/cxf/pull/618#discussion_r361856660
 
 

 ##########
 File path: core/src/main/java/org/apache/cxf/feature/transform/XSLTOutInterceptor.java
 ##########
 @@ -169,7 +169,7 @@ public void onClose(CachedOutputStream wrapper) {
             } finally {
                 try {
                     origStream.close();
-                } catch (IOException e) {
+                } catch (Exception e) {
 
 Review comment:
   I am not sure what this change is for, `close()` may thrown only `IOException`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [cxf] reda-alaoui commented on a change in pull request #618: On connection refused, XSLTOutInterceptor mangles the error

Posted by GitBox <gi...@apache.org>.
reda-alaoui commented on a change in pull request #618: On connection refused, XSLTOutInterceptor mangles the error
URL: https://github.com/apache/cxf/pull/618#discussion_r361858179
 
 

 ##########
 File path: core/src/main/java/org/apache/cxf/feature/transform/XSLTOutInterceptor.java
 ##########
 @@ -169,7 +169,7 @@ public void onClose(CachedOutputStream wrapper) {
             } finally {
                 try {
                     origStream.close();
-                } catch (IOException e) {
+                } catch (Exception e) {
 
 Review comment:
   This test case reproduce a production case where the exception at this point is:
   
   ```java.lang.IllegalStateException: IllegalStateException invoking http://127.0.0.1:37907/: Already connected
   	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
   	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
   	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
   	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1400)
   	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1389)
   	at org.apache.cxf.feature.transform.XSLTOutInterceptor$XSLTCachedOutputStreamCallback.onClose(XSLTOutInterceptor.java:171)
   	at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:219)
   	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
   	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:671)
   	at
   ...
   ```
   
   You can debug the test with a breakpoint at the commented line to see it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [cxf] reta merged pull request #618: On connection refused, XSLTOutInterceptor mangles the error

Posted by GitBox <gi...@apache.org>.
reta merged pull request #618: On connection refused, XSLTOutInterceptor mangles the error
URL: https://github.com/apache/cxf/pull/618
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [cxf] reta commented on a change in pull request #618: On connection refused, XSLTOutInterceptor mangles the error

Posted by GitBox <gi...@apache.org>.
reta commented on a change in pull request #618: On connection refused, XSLTOutInterceptor mangles the error
URL: https://github.com/apache/cxf/pull/618#discussion_r361856660
 
 

 ##########
 File path: core/src/main/java/org/apache/cxf/feature/transform/XSLTOutInterceptor.java
 ##########
 @@ -169,7 +169,7 @@ public void onClose(CachedOutputStream wrapper) {
             } finally {
                 try {
                     origStream.close();
-                } catch (IOException e) {
+                } catch (Exception e) {
 
 Review comment:
   I am not sure what this change is for, `close()` may throw only `IOException`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [cxf] reta commented on a change in pull request #618: On connection refused, XSLTOutInterceptor mangles the error

Posted by GitBox <gi...@apache.org>.
reta commented on a change in pull request #618: On connection refused, XSLTOutInterceptor mangles the error
URL: https://github.com/apache/cxf/pull/618#discussion_r361866536
 
 

 ##########
 File path: core/src/main/java/org/apache/cxf/feature/transform/XSLTOutInterceptor.java
 ##########
 @@ -169,7 +169,7 @@ public void onClose(CachedOutputStream wrapper) {
             } finally {
                 try {
                     origStream.close();
-                } catch (IOException e) {
+                } catch (Exception e) {
 
 Review comment:
   :+1: you are right, I see it now, thank you

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [cxf] reta edited a comment on issue #618: On connection refused, XSLTOutInterceptor mangles the error

Posted by GitBox <gi...@apache.org>.
reta edited a comment on issue #618: On connection refused, XSLTOutInterceptor mangles the error
URL: https://github.com/apache/cxf/pull/618#issuecomment-569532294
 
 
   > 
   > 
   > The build failed on `org.apache.cxf.transport.jms.util.MessageListenerTest.testLocalTransaction`. But the same test is green on my computer.
   
   This test is a flaky one at the moment, unfortunately, nothing to worry about with respect to this PR.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [cxf] reda-alaoui commented on issue #618: On connection refused, XSLTOutInterceptor mangles the error

Posted by GitBox <gi...@apache.org>.
reda-alaoui commented on issue #618: On connection refused, XSLTOutInterceptor mangles the error
URL: https://github.com/apache/cxf/pull/618#issuecomment-569525972
 
 
   The build failed on `org.apache.cxf.transport.jms.util.MessageListenerTest.testLocalTransaction`. But the same test is green on my computer.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services