2017-06-09 10:18:17 | ERROR | [main] c.g.h.n.c.Main:118 - Content type "application/xml" is not supported for type: class com.github.hermannpencole.nifi.swagger.client.model.TemplateEntity
com.github.hermannpencole.nifi.swagger.ApiException: Content type "application/xml" is not supported for type: class com.github.hermannpencole.nifi.swagger.client.model.TemplateEntity
at com.github.hermannpencole.nifi.swagger.ApiClient.deserialize(ApiClient.java:848)
at com.github.hermannpencole.nifi.swagger.ApiClient.handleResponse(ApiClient.java:1036)
at com.github.hermannpencole.nifi.swagger.ApiClient.execute(ApiClient.java:970)
at com.github.hermannpencole.nifi.swagger.client.ProcessGroupsApi.uploadTemplateWithHttpInfo(ProcessGroupsApi.java:3134)
at com.github.hermannpencole.nifi.swagger.client.ProcessGroupsApi.uploadTemplate(ProcessGroupsApi.java:3119)
at com.github.hermannpencole.nifi.config.service.TemplateService.installOnBranch(TemplateService.java:70)
at com.github.hermannpencole.nifi.config.Main.main(Main.java:109)
Exception in thread "main" com.github.hermannpencole.nifi.config.model.ConfigException: Content type "application/xml" is not supported for type: class com.github.hermannpencole.nifi.swagger.client.model.TemplateEntity: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><templateEntity><template encoding-version="1.1"><description></description><groupId>87dfda65-015c-1000-51e7-a126b1faad51</groupId><id>dfa8a2eb-02c6-45ba-a5e1-b4083a802fe4</id><name>river</name><timestamp>06/08/2017 18:25:46 UTC</timestamp><uri>http://localhost:8083/nifi-api/templates/dfa8a2eb-02c6-45ba-a5e1-b4083a802fe4</uri></template></templateEntity>
at com.github.hermannpencole.nifi.config.Main.main(Main.java:119)
Caused by: com.github.hermannpencole.nifi.swagger.ApiException: Content type "application/xml" is not supported for type: class com.github.hermannpencole.nifi.swagger.client.model.TemplateEntity
at com.github.hermannpencole.nifi.swagger.ApiClient.deserialize(ApiClient.java:848)
at com.github.hermannpencole.nifi.swagger.ApiClient.handleResponse(ApiClient.java:1036)
at com.github.hermannpencole.nifi.swagger.ApiClient.execute(ApiClient.java:970)
at com.github.hermannpencole.nifi.swagger.client.ProcessGroupsApi.uploadTemplateWithHttpInfo(ProcessGroupsApi.java:3134)
at com.github.hermannpencole.nifi.swagger.client.ProcessGroupsApi.uploadTemplate(ProcessGroupsApi.java:3119)
at com.github.hermannpencole.nifi.config.service.TemplateService.installOnBranch(TemplateService.java:70)
at com.github.hermannpencole.nifi.config.Main.main(Main.java:109)
It seems that uploadTemplate returns XML, but ApiClient only supports JSON data.
When I invoked command like that:
nifi-deploy-config -nifi http://my-nifi-/nifi-api -branch "root/my-process-group" -conf ~/Downloads/my-template.xml -m deployTemplate
I received the following error:
It seems that
uploadTemplate
returns XML, but ApiClient only supports JSON data.