Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
user19
Contributor
Contributor

Rest route throwing error java.io.IOException: stream is closed

I am creating a Rest Route. It is a simple route which takes Request and get the response from endpoint which is located on Swagger. I have used build in Meta Data Rest API definition to add my Api. Now when I am trying to call the Endpoint using Soap UI it throws Error java.io.IOException: stream is closed. Idon't understand what is the reason behind this error. Following screenshot contain full trace of Error.

0695b00000PMSXgAAP.png 

Can some one please guide me What is wrong why I am getting this error? Any help would be appreciated.

 

Edited:

Before I didn't added the response class "javax.ws.rs.core.Response" in tRest-2 now after adding class I got this error

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Unfortunately it can be quite difficult to work on services when you have no access to them yourself. I had to recreate a similar environment to what you showed and try a few things out. I realised that in my scenario, I could use a cHttp component (to replace the second cREST), so tried it and it worked. The Endpoint was created exactly the same way.

 

I have done a bit of Googling about this issue. These are Apache Camel components, so it is always good to search for answers in that domain as well. It turns out that the marshalling of incoming data can cause a similar issue. So I ticked the "Skip incoming data unmarshalling" tickbox on the second cREST component (which I've added back). This appears to solve it for me as well.

View solution in original post

13 Replies
Anonymous
Not applicable

Have you had this service running successfully at all? Can you show us the design and the configuration of your endpoint?

user19
Contributor
Contributor
Author

@rhall I added the screenshots in Question. Yes service is running successfully at server side

gjeremy1617088143

hi @alya mobeen​ , wich JDK version are you using ?

user19
Contributor
Contributor
Author

@guenneguez jeremy​  jdk-11.0.8

gjeremy1617088143

and wich version of Talend are you using ?

user19
Contributor
Contributor
Author

talend 7.3

 

gjeremy1617088143

I think for 7.3 JDK-8 is recommended, JDK-11 is for 8.0

user19
Contributor
Contributor
Author

but it never create problem before. So do you think this is the reason for error?

gjeremy1617088143

javax.ws.rs.core

seems to be a deprecated since JDK 9

and removed in JDK 11