Skip to content
This repository has been archived by the owner on Mar 27, 2020. It is now read-only.

RundeckClient.deleteJob() throws RundeckApiException #14

Closed
jeffbeard opened this issue Nov 5, 2014 · 3 comments
Closed

RundeckClient.deleteJob() throws RundeckApiException #14

jeffbeard opened this issue Nov 5, 2014 · 3 comments
Labels

Comments

@jeffbeard
Copy link

We upgraded our Rundeck instance and afterwards calling the RundeckClient.deleteJob(String) method results in a RundeckApiException. The cause seems to be an incorrect handling of a 204 response, which I think is typical of a DELETE method. Here's the stacktrace:

org.rundeck.api.RundeckApiException: Failed to read RunDeck reponse
    at org.rundeck.api.parser.ParserHelper.loadDocument(ParserHelper.java:47) ~[rundeck-api-java-client-11.0.jar:na]
    at org.rundeck.api.ApiCall$ParserHandler.handle(ApiCall.java:438) ~[rundeck-api-java-client-11.0.jar:na]
    at org.rundeck.api.ApiCall.execute(ApiCall.java:368) ~[rundeck-api-java-client-11.0.jar:na]
    at org.rundeck.api.ApiCall.delete(ApiCall.java:335) ~[rundeck-api-java-client-11.0.jar:na]
    at org.rundeck.api.RundeckClient.deleteJob(RundeckClient.java:1042) ~[rundeck-api-java-client-11.0.jar:na]
[...]
Caused by: org.dom4j.DocumentException: null Nested exception: null
    at org.dom4j.io.SAXReader.read(SAXReader.java:484) ~[dom4j-1.6.1.jar:1.6.1]
    at org.dom4j.io.SAXReader.read(SAXReader.java:343) ~[dom4j-1.6.1.jar:1.6.1]
    at org.rundeck.api.parser.ParserHelper.loadDocument(ParserHelper.java:45) ~[rundeck-api-java-client-11.0.jar:na]
    ... 36 common frames omitted

The "null" value enters into the system on line 582 of RundeckClient.

This appears to be the case for version 9.3, which we started with, and 11.0 which we also tested.

We chose to work around the issue by using the deleteJobs(List<String>) method instead.

Thanks!

@gschueler gschueler added the bug label Nov 6, 2014
@gschueler
Copy link
Member

thanks for the report, what version of rundeck did you upgrade to?

@jeffbeard
Copy link
Author

Thanks for the fast response! We're using 2.2.0-1 at the moment.

@gschueler
Copy link
Member

fyi: released version 11.1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants