Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Getting tStatCatcher to Graylog with tRESTClient - java.lang.IllegalStateException: The entity is not backed by an input stream, entity class is : java.lang.String

Dear Community,

currently I am trying to send the output of tStatCatcher to a Graylog server via a REST API call. The data must be transferred to the API as a JSON string.

I have created the following process:
tStatCatcher -> tXMLMap -> tRESTClient

0683p000009Lry2.png

In the tXMLMap module, the fields are mapped to an XML structure. Finally, the tRESTClient should transmit the data via POST in JSON format. Otherwise, I have not made any other settings.

tXMLMap-Mapping:
0683p000009Lrsc.png

tRESTClient-Config:
0683p000009LrbM.png

Unfortunately, when I run the tRESTClient I get an exception that I can't explain:

 

Exception in component tRESTClient_1 (SYNC_PARTY)
javax.ws.rs.ProcessingException: java.lang.IllegalStateException: The entity is not backed by an input stream, entity class is : java.lang.String
	at org.apache.cxf.jaxrs.client.WebClient.handleResponse(WebClient.java:1148)
	at org.apache.cxf.jaxrs.client.WebClient.doResponse(WebClient.java:1117)
	at org.apache.cxf.jaxrs.client.WebClient.doChainedInvocation(WebClient.java:1042)
	at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:895)
	at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:863)
	at org.apache.cxf.jaxrs.client.WebClient.invoke(WebClient.java:426)
	at org.apache.cxf.jaxrs.client.WebClient.post(WebClient.java:456)
	at trypartysync.sync_vodster_0_1.SYNC_PARTY.tStatCatcher_1Process(SYNC_PARTY.java:12007)
	at trypartysync.sync_vodster_0_1.SYNC_PARTY.runJobInTOS(SYNC_PARTY.java:12769)
	at trypartysync.sync_vodster_0_1.SYNC_PARTY.main(SYNC_PARTY.java:12613)
Caused by: java.lang.IllegalStateException: The entity is not backed by an input stream, entity class is : java.lang.String
	at org.apache.cxf.jaxrs.impl.ResponseImpl.doReadEntity(ResponseImpl.java:394)
	at org.apache.cxf.jaxrs.client.AbstractClient.readBody(AbstractClient.java:524)
	at org.apache.cxf.jaxrs.client.WebClient.handleResponse(WebClient.java:1129)
	... 9 more

Here is the relevant code:

 


0683p000009Lryp.png

Do you have an idea how I could solve it or what could be the cause of the problem?

Hopefully you have an idea. Otherwise I would try to make a system call with "curl". But that would just be a stupid workaround. It should only be possible to solve it with Talend.

Thanks in advance for you help.
Volker

Labels (6)
12 Replies
Anonymous
Not applicable
Author

You do not need to assign a row value to the tRest. Take a look at here (https://help.talend.com/reader/iYcvdknuprDzYycT3WRU8w/_N82Hv0ivAnxD69EWaC5rA). You need to do a bit more work with the tRest, but you can use a tSetGlobalVar to store your computed JSON and add it to the HTTP Body using the globalMap. You can even test by hardcoding some JSON as a String.

Anonymous
Not applicable
Author

Thanks to Rhall's last post, I've got it working like a charm now. Finally 🙂
The statistics are protocolled to my Graylog Server with the help of the HTTP GELF input.

Here is the overview of the working configuration:

0683p000009Ls68.png

The OnComponentOk trigger starts tREST.

0683p000009LruX.png

0683p000009Ls6N.png


0683p000009LryG.png

0683p000009LrvS.png

0683p000009Ls6X.png

Thanks again, Rhall, for your help.

Anonymous
Not applicable
Author

Good work and thanks for doing the write up for others to use in the future