UT010029: Stream is closed with WebHook connector
See original GitHub issueThis is a…
[ ] Feature request
[ ] Regression (a behavior that used to work and stopped working in a new release)
[b] Bug report
[ ] Documentation issue or request
Description
WebHook connector reads the HTTP body as InputStream
and replaces it with Syndesis specific JSON containing parameters/body. The binding (org.apache.camel.http.common.DefaultHttpBinding
) that created the message (org.apache.camel.http.common.HttpMessage
) reads from the InputStream
of the HttpServletRequest
and closes the stream. If the next processor in the exchange is a org.apache.camel.processor.Pipeline
org.apache.camel.util.ExchangeHelper::copyResults
is invoked and ends up calling HttpMessage::createBody
that ends up calling DefaultHttpBinding::parseBody
reading the InputStream
for the second time.
At this time the InputStream
is already closed so UT010029: Stream is closed
is reported.
Caused by: java.io.IOException: UT010029: Stream is closed
at io.undertow.servlet.spec.ServletInputStreamImpl.available(ServletInputStreamImpl.java:237) ~[undertow-servlet-1.4.25.Final.jar:1.4.25.Final]
at org.apache.camel.http.common.HttpConverter.toInputStream(HttpConverter.java:86) ~[camel-http-common-2.21.1.jar:2.21.1]
at org.apache.camel.http.common.HttpHelper.readRequestBodyFromServletRequest(HttpHelper.java:193) ~[camel-http-common-2.21.1.jar:2.21.1]
at org.apache.camel.http.common.DefaultHttpBinding.parseBody(DefaultHttpBinding.java:577) ~[camel-http-common-2.21.1.jar:2.21.1]
at org.apache.camel.http.common.HttpMessage.createBody(HttpMessage.java:78) ~[camel-http-common-2.21.1.jar:2.21.1]
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:29 (13 by maintainers)
Top Results From Across the Web
Caused by: java.io.IOException: UT010029: Stream is closed
I have a error message (Caused by: java.io.IOException: UT010029: Stream is closed ) with a curl commande below : the error is in...
Read more >java.io.IOException: UT010029: Stream is closed
Cf. its JavaDocs: "Closing a ByteArrayOutputStream has no effect. The methods in this class can be called after the stream has been closed...
Read more >Webhooks and connectors - Teams - Microsoft Learn
Learn how webhooks and connectors help to connect the web services to channels and teams in Microsoft Teams. Learn Incoming, Outgoing ...
Read more >Webhooks Overview - Other/REST chat - GetStream.io
By using webhooks, you can tightly integrate your server application with Stream Chat. The platform supports three kinds of webhooks: Push, ...
Read more >Solved: java.io.IOException: UT010029: Stream is closed on...
Random, I have the exception whose stack trace can be read in the attached file. What can cause this? Is ReadyApi using an...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No issues on my side as well, verified.
the fix verified on 1.5.4-20181010