Bitcoind returning "Invalid JSON-RPC 2.0 response"?
As it turns out, the library I am using does not like JSON responses that contain both the field "error" and "response", even if the "error" field is set to null. I have already notified the creator of the library to possibly fix that issue and I have patched it myself as well:

In the private Map&lt;String,Object&gt; parseJSONObject(final String jsonString) function, one needs to add this at the end:

    Map&lt;String,Object&gt; answer = (Map&lt;String,Object&gt;)json;

    if (answer.containsKey("error")){
        if (answer.get("error")==null){
            answer.remove("error");
        }
    }
    if (answer.containsKey("result")){
        if (answer.get("result")==null){
            answer.remove("result");
        }
    }

    return answer;