我在执行talend工作时遇到错误, 这是我的另一份工作,
tRESTClient --> tXMLMap --> tLogrow
错误是:
Exception in component tRESTClient_1 (GitHubJob)
javax.ws.rs.NotSupportedException: HTTP 415 Unsupported Media Type
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.apache.cxf.jaxrs.client.AbstractClient.convertToWebApplicationException(AbstractClient.java:507)
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.get(WebClient.java:609)
at local_project.githubjob_0_1.GitHubJob.tRESTClient_1Process(GitHubJob.java:1185)
at local_project.githubjob_0_1.GitHubJob.tMongoDBConnection_1Process(GitHubJob.java:440)
at local_project.githubjob_0_1.GitHubJob.runJobInTOS(GitHubJob.java:1982)
[statistics] disconnected
at local_project.githubjob_0_1.GitHubJob.main(GitHubJob.java:1831)
这个问题的解决方案是什么?
答案 0 :(得分:0)
请添加HTTP标头,如:content-type =“application / json”