[jira] [Commented] (CAMEL-13886) camel-servlet + camel-http4 with null body causes "Stream closed" IOException

2019-08-22 Thread Tadayoshi Sato (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-13886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16913906#comment-16913906
 ] 

Tadayoshi Sato commented on CAMEL-13886:


[~davsclaus] No, it turned out my previous fix was not really correct. I 
reverted it from both 2.x and 3.x. I'm working on a better fix right now.

> camel-servlet + camel-http4 with null body causes "Stream closed" IOException
> -
>
> Key: CAMEL-13886
> URL: https://issues.apache.org/jira/browse/CAMEL-13886
> Project: Camel
>  Issue Type: Bug
>  Components: camel-http-common, camel-http4, camel-servlet
>Affects Versions: 2.25.0, 3.0.0.M4
>Reporter: Tadayoshi Sato
>Assignee: Tadayoshi Sato
>Priority: Major
>
> A Rest DSL route like the following causes {{java.io.IOException: Stream 
> closed}} when invoked at http://localhost:8000/test/proxy:
> {code:java}
> rest("/test")
> .get("/proxy")
> .to("direct:callInternalRestService");
> from("direct:callInternalRestService")
> .setHeader(Exchange.HTTP_METHOD, constant("DELETE"))
> //.setBody(constant("")) // workaround for null body and 
> http4 component
> .to("http4://localhost:9000/test?bridgeEndpoint=true")
> .log("${body}");
> {code}
> The error stacktrace:
> {code}
> Caused by: java.io.IOException: Stream closed
>   at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:372)
>   at 
> org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:156)
>   at org.apache.camel.util.IOHelper.copy(IOHelper.java:202)
>   at org.apache.camel.util.IOHelper.copy(IOHelper.java:174)
>   at org.apache.camel.util.IOHelper.copyAndCloseInput(IOHelper.java:234)
>   at org.apache.camel.util.IOHelper.copyAndCloseInput(IOHelper.java:230)
>   at 
> org.apache.camel.http.common.HttpHelper.readResponseBodyFromInputStream(HttpHelper.java:245)
>   at 
> org.apache.camel.http.common.HttpHelper.readRequestBodyFromServletRequest(HttpHelper.java:196)
>   at 
> org.apache.camel.http.common.DefaultHttpBinding.parseBody(DefaultHttpBinding.java:577)
>   at 
> org.apache.camel.http.common.HttpMessage.createBody(HttpMessage.java:78)
>   ... 54 common frames omitted
> {code}
> -This seems to happen only when Tomcat is used as the container with Spring 
> Boot. Undertow doesn't cause such an issue.-



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Commented] (CAMEL-13886) camel-servlet + camel-http4 with null body causes "Stream closed" IOException

2019-08-22 Thread Claus Ibsen (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-13886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16913893#comment-16913893
 ] 

Claus Ibsen commented on CAMEL-13886:
-

Okay but this works for Camel 3.x? If so then we can have a fix here if we dont 
find a solution that works on the old 2.x and 3.x at the same time.

> camel-servlet + camel-http4 with null body causes "Stream closed" IOException
> -
>
> Key: CAMEL-13886
> URL: https://issues.apache.org/jira/browse/CAMEL-13886
> Project: Camel
>  Issue Type: Bug
>  Components: camel-http-common, camel-http4, camel-servlet
>Affects Versions: 2.25.0, 3.0.0.M4
>Reporter: Tadayoshi Sato
>Assignee: Tadayoshi Sato
>Priority: Major
> Fix For: 2.25.0, 3.0.0.RC1
>
>
> A Rest DSL route like the following causes {{java.io.IOException: Stream 
> closed}} when invoked at http://localhost:8000/test/proxy:
> {code:java}
> rest("/test")
> .get("/proxy")
> .to("direct:callInternalRestService");
> from("direct:callInternalRestService")
> .setHeader(Exchange.HTTP_METHOD, constant("DELETE"))
> //.setBody(constant("")) // workaround for null body and 
> http4 component
> .to("http4://localhost:9000/test?bridgeEndpoint=true")
> .log("${body}");
> {code}
> The error stacktrace:
> {code}
> Caused by: java.io.IOException: Stream closed
>   at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:372)
>   at 
> org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:156)
>   at org.apache.camel.util.IOHelper.copy(IOHelper.java:202)
>   at org.apache.camel.util.IOHelper.copy(IOHelper.java:174)
>   at org.apache.camel.util.IOHelper.copyAndCloseInput(IOHelper.java:234)
>   at org.apache.camel.util.IOHelper.copyAndCloseInput(IOHelper.java:230)
>   at 
> org.apache.camel.http.common.HttpHelper.readResponseBodyFromInputStream(HttpHelper.java:245)
>   at 
> org.apache.camel.http.common.HttpHelper.readRequestBodyFromServletRequest(HttpHelper.java:196)
>   at 
> org.apache.camel.http.common.DefaultHttpBinding.parseBody(DefaultHttpBinding.java:577)
>   at 
> org.apache.camel.http.common.HttpMessage.createBody(HttpMessage.java:78)
>   ... 54 common frames omitted
> {code}
> -This seems to happen only when Tomcat is used as the container with Spring 
> Boot. Undertow doesn't cause such an issue.-



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Commented] (CAMEL-13886) camel-servlet + camel-http4 with null body causes "Stream closed" IOException

2019-08-21 Thread Tadayoshi Sato (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-13886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16912859#comment-16912859
 ] 

Tadayoshi Sato commented on CAMEL-13886:


[~coheigea] Yes, I noticed the failures too. Working on it. Thanks for your 
notification.

> camel-servlet + camel-http4 with null body causes "Stream closed" IOException
> -
>
> Key: CAMEL-13886
> URL: https://issues.apache.org/jira/browse/CAMEL-13886
> Project: Camel
>  Issue Type: Bug
>  Components: camel-http-common, camel-http4, camel-servlet
>Affects Versions: 2.25.0, 3.0.0.M4
>Reporter: Tadayoshi Sato
>Assignee: Tadayoshi Sato
>Priority: Major
> Fix For: 2.25.0, 3.0.0.RC1
>
>
> A Rest DSL route like the following causes {{java.io.IOException: Stream 
> closed}} when invoked at http://localhost:8000/test/proxy:
> {code:java}
> rest("/test")
> .get("/proxy")
> .to("direct:callInternalRestService");
> from("direct:callInternalRestService")
> .setHeader(Exchange.HTTP_METHOD, constant("DELETE"))
> //.setBody(constant("")) // workaround for null body and 
> http4 component
> .to("http4://localhost:9000/test?bridgeEndpoint=true")
> .log("${body}");
> {code}
> The error stacktrace:
> {code}
> Caused by: java.io.IOException: Stream closed
>   at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:372)
>   at 
> org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:156)
>   at org.apache.camel.util.IOHelper.copy(IOHelper.java:202)
>   at org.apache.camel.util.IOHelper.copy(IOHelper.java:174)
>   at org.apache.camel.util.IOHelper.copyAndCloseInput(IOHelper.java:234)
>   at org.apache.camel.util.IOHelper.copyAndCloseInput(IOHelper.java:230)
>   at 
> org.apache.camel.http.common.HttpHelper.readResponseBodyFromInputStream(HttpHelper.java:245)
>   at 
> org.apache.camel.http.common.HttpHelper.readRequestBodyFromServletRequest(HttpHelper.java:196)
>   at 
> org.apache.camel.http.common.DefaultHttpBinding.parseBody(DefaultHttpBinding.java:577)
>   at 
> org.apache.camel.http.common.HttpMessage.createBody(HttpMessage.java:78)
>   ... 54 common frames omitted
> {code}
> This seems to happen only when Tomcat is used as the container with Spring 
> Boot. Undertow doesn't cause such an issue.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Commented] (CAMEL-13886) camel-servlet + camel-http4 with null body causes "Stream closed" IOException

2019-08-21 Thread Colm O hEigeartaigh (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-13886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16912281#comment-16912281
 ] 

Colm O hEigeartaigh commented on CAMEL-13886:
-

[~tadayosi] - looks like this issues caused some test failures on 2.x in 
camel-servlet + camel-jetty: 
https://builds.apache.org/job/Camel/job/camel-2.x/230/#showFailuresLink

> camel-servlet + camel-http4 with null body causes "Stream closed" IOException
> -
>
> Key: CAMEL-13886
> URL: https://issues.apache.org/jira/browse/CAMEL-13886
> Project: Camel
>  Issue Type: Bug
>  Components: camel-http-common, camel-http4, camel-servlet
>Affects Versions: 2.25.0, 3.0.0.M4
>Reporter: Tadayoshi Sato
>Assignee: Tadayoshi Sato
>Priority: Major
> Fix For: 2.25.0, 3.0.0.RC1
>
>
> A Rest DSL route like the following causes {{java.io.IOException: Stream 
> closed}} when invoked at http://localhost:8000/test/proxy:
> {code:java}
> rest("/test")
> .get("/proxy")
> .to("direct:callInternalRestService");
> from("direct:callInternalRestService")
> .setHeader(Exchange.HTTP_METHOD, constant("DELETE"))
> //.setBody(constant("")) // workaround for null body and 
> http4 component
> .to("http4://localhost:9000/test?bridgeEndpoint=true")
> .log("${body}");
> {code}
> The error stacktrace:
> {code}
> Caused by: java.io.IOException: Stream closed
>   at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:372)
>   at 
> org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:156)
>   at org.apache.camel.util.IOHelper.copy(IOHelper.java:202)
>   at org.apache.camel.util.IOHelper.copy(IOHelper.java:174)
>   at org.apache.camel.util.IOHelper.copyAndCloseInput(IOHelper.java:234)
>   at org.apache.camel.util.IOHelper.copyAndCloseInput(IOHelper.java:230)
>   at 
> org.apache.camel.http.common.HttpHelper.readResponseBodyFromInputStream(HttpHelper.java:245)
>   at 
> org.apache.camel.http.common.HttpHelper.readRequestBodyFromServletRequest(HttpHelper.java:196)
>   at 
> org.apache.camel.http.common.DefaultHttpBinding.parseBody(DefaultHttpBinding.java:577)
>   at 
> org.apache.camel.http.common.HttpMessage.createBody(HttpMessage.java:78)
>   ... 54 common frames omitted
> {code}
> This seems to happen only when Tomcat is used as the container with Spring 
> Boot. Undertow doesn't cause such an issue.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)