question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UT010029: Stream is closed with WebHook connector

See original GitHub issue

This 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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:29 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
mmuzikarcommented, Aug 8, 2019

No issues on my side as well, verified.

1reaction
mastepancommented, Oct 18, 2018

the fix verified on 1.5.4-20181010

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found