Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tRESTCLient DELETE does not work

Hi Team,

I am using tRESTClient in one of my jobs to POST data and DELETE data when required. 
POST works perfectly fine but DELETE throws me the following error:


Exception in component tRESTClient_1
java.lang.RuntimeException: org.apache.cxf.interceptor.Fault: .Problem with writing the request message, class : class org.dom4j.tree.DefaultDocument, ContentType : application/xml.
at org.apache.cxf.jaxrs.client.WebClient.doResponse(WebClient.java:1121)
at org.apache.cxf.jaxrs.client.WebClient.doChainedInvocation(WebClient.java:1072)
at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:878)
at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:852)
at org.apache.cxf.jaxrs.client.WebClient.invoke(WebClient.java:312)
at finance_datalake.copy_of_poc_soa_api_0_1.Copy_of_POC_SOA_API.tGreenplumInput_1Process(Copy_of_POC_SOA_API.java:2624)
at finance_datalake.copy_of_poc_soa_api_0_1.Copy_of_POC_SOA_API.runJobInTOS(Copy_of_POC_SOA_API.java:6296)
at finance_datalake.copy_of_poc_soa_api_0_1.Copy_of_POC_SOA_API.main(Copy_of_POC_SOA_API.java:5954)
Caused by: org.apache.cxf.interceptor.Fault: .Problem with writing the request message, class : class org.dom4j.tree.DefaultDocument, ContentType : application/xml.
at org.apache.cxf.jaxrs.client.WebClient$BodyWriter.doWriteBody(WebClient.java:1202)
at org.apache.cxf.jaxrs.client.AbstractClient$AbstractBodyWriter.handleMessage(AbstractClient.java:1052)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
at org.apache.cxf.jaxrs.client.AbstractClient.doRunInterceptorChain(AbstractClient.java:635)
at org.apache.cxf.jaxrs.client.WebClient.doChainedInvocation(WebClient.java:1071)
... 6 more
Caused by: javax.ws.rs.client.ClientException: .Problem with writing the request message, class : class org.dom4j.tree.DefaultDocument, ContentType : application/xml.
at org.apache.cxf.jaxrs.client.AbstractClient.reportMessageHandlerProblem(AbstractClient.java:756)
at org.apache.cxf.jaxrs.client.AbstractClient.writeBody(AbstractClient.java:450)
at org.apache.cxf.jaxrs.client.WebClient$BodyWriter.doWriteBody(WebClient.java:1197)
... 10 more
Caused by: java.net.ProtocolException: HTTP method DELETE doesn't support output
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.setupWrappedStream(URLConnectionHTTPConduit.java:174)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCaching(HTTPConduit.java:1290)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.onFirstWrite(HTTPConduit.java:1246)
at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.onFirstWrite(URLConnectionHTTPConduit.java:201)
at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:47)
at org.apache.cxf.io.AbstractThresholdOutputStream.write(AbstractThresholdOutputStream.java:69)
at org.apache.cxf.io.CacheAndWriteOutputStream.write(CacheAndWriteOutputStream.java:80)
at sun.nio.cs.StreamEncoder.writeBytes(Unknown Source)
at sun.nio.cs.StreamEncoder.implFlushBuffer(Unknown Source)
at sun.nio.cs.StreamEncoder.implFlush(Unknown Source)
at sun.nio.cs.StreamEncoder.flush(Unknown Source)
at java.io.OutputStreamWriter.flush(Unknown Source)
at java.io.BufferedWriter.flush(Unknown Source)
at org.dom4j.io.XMLWriter.flush(XMLWriter.java:272)
at org.dom4j.io.XMLWriter.write(XMLWriter.java:350)
at org.apache.cxf.jaxrs.provider.dom4j.DOM4JProvider.writeTo(DOM4JProvider.java:92)
at org.apache.cxf.jaxrs.provider.dom4j.DOM4JProvider.writeTo(DOM4JProvider.java:42)
at org.apache.cxf.jaxrs.utils.JAXRSUtils.writeMessageBody(JAXRSUtils.java:1295)
at org.apache.cxf.jaxrs.client.AbstractClient.writeBody(AbstractClient.java:436)
... 11 more


Requesting you to kindly help me out in debugging the error/configuring the RESTClient. 


Job Design:
DB_Input --> XMLMap --> tRESTClient -->tLogRow
Labels (5)
4 Replies
Anonymous
Not applicable
Author

Hi,
Could you please try to use tRestClient --> tLog and hardcode the path to see if it works well?
Would you mind uploading your component setting screenshots into forum?
Best regards
Sabrina
Anonymous
Not applicable
Author

Hi Sabrina,

I did try to upload the screenshots. But there is some error.
Anonymous
Not applicable
Author

Hi,
What's the error message you are getting when upload screenshot into forum? Have you tried it on other browsers?
Best regards
Sabrina
Anonymous
Not applicable
Author

- It seems your post consisted of empty BBCodes only. It is possible that this happened because e.g. the innermost quote was discarded because of the maximum quote depth level.

This is the error message I get.