java.lang.IllegalArgumentException:URI不是绝对的

时间:2018-04-04 18:27:43

标签: java rest

我正在使用POST调用rest API。它发生在基于JAVA的ETL工具中。

这是我的步骤:

String inp =我的JSON数据;

然后转换上面的字符串文档类型,然后使用in来调用API

但是我得到了吼叫错误

Exception in component tRESTClient_1
javax.ws.rs.ProcessingException: java.lang.IllegalArgumentException: URI is not absolute
    at org.apache.cxf.jaxrs.client.AbstractClient.checkClientException(AbstractClient.java:582)
    at org.apache.cxf.jaxrs.client.AbstractClient.preProcessResult(AbstractClient.java:564)
    at org.apache.cxf.jaxrs.client.WebClient.doResponse(WebClient.java:1144)
    at org.apache.cxf.jaxrs.client.WebClient.doChainedInvocation(WebClient.java:1094)
    at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:894)
    at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:865)
    at org.apache.cxf.jaxrs.client.WebClient.invoke(WebClient.java:428)
    at org.apache.cxf.jaxrs.client.WebClient.post(WebClient.java:458)
    at project_salesforce.jbposemailsignupcall_0_10.jbPosEmailSignupCall.tFixedFlowInput_1Process(jbPosEmailSignupCall.java:5319)
    at project_salesforce.jbposemailsignupcall_0_10.jbPosEmailSignupCall.tFileList_1Process(jbPosEmailSignupCall.java:4129)
    at project_salesforce.jbposemailsignupcall_0_10.jbPosEmailSignupCall$4.run(jbPosEmailSignupCall.java:13175)
Caused by: java.lang.IllegalArgumentException: URI is not absolute
    at java.net.URI.toURL(URI.java:1088)
    at org.apache.cxf.transport.http.Address.getURL(Address.java:60)
    at org.apache.cxf.transport.http.URLConnectionHTTPConduit.createConnection(URLConnectionHTTPConduit.java:104)
    at org.apache.cxf.transport.http.URLConnectionHTTPConduit.setupConnection(URLConnectionHTTPConduit.java:117)
    at org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:497)
    at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
    at org.apache.cxf.jaxrs.client.AbstractClient.doRunInterceptorChain(AbstractClient.java:649)
    at org.apache.cxf.jaxrs.client.WebClient.doChainedInvocation(WebClient.java:1093)
    ... 7 more

我可以根据错误知道,可能出现什么问题或需要检查的地方?因为当我在POSTMAN中使用相同的JSON数据时,它可以正常工作。

由于

0 个答案:

没有答案