Consumer UPDATE chokes on json produced by Consumer GET. SHould be reproducible via curl: curl -u admin:admin http://localhost:8080/candlepin/consumers/<uuid> curl -u admin:admin -H "Content-type: application/json" -X PUT <json from the previous step> http://localhost:8080/candlepin/consumers/<uuid>
the above PUT command is incorrect, it requires --data BEFORE the <json from the previous step>. Without --data, I get the following error: {"displayMessage":"Runtime Error java.io.EOFException: No content to map to Object due to end of input at org.codehaus.jackson.map.ObjectMapper._initForReading:2,766"} This is expected. If you want to PUT or POST please use --data from curl.
Using --data, the following scenarios worked: GET: curl -u admin:admin http://localhost:8080/candlepin/consumers/<uuid> > consumer.json curl -k -u admin:admin https://localhost:8443/candlepin/consumers/<uuid> > consumer.json PUT: curl -k -u admin:admin -H "Content-type: application/json" -X PUT --data @consumer.json https://localhost:8443/candlepin/consumers/<uuid> curl -u admin:admin -H "Content-type: application/json" -X PUT --data @consumer.json http://localhost:8080/candlepin/consumers/<uuid> The following requires single quotes (') around the JSON: curl -k -u admin:admin -H "Content-type: application/json" -X PUT --data 'PASTED JSON DIRECTLY INTO TERMINAL' https://localhost:8443/candlepin/consumers/<uuid> curl -u admin:admin -H "Content-type: application/json" -X PUT --data 'PASTED JSON DIRECTLY INTO TERMINAL' http://localhost:8080/candlepin/consumers/<uuid> None of the above produced an error. Then I MODIFIED the consumer.json to change the name and autoheal values BEFORE executing the PUT. After modifying the input the PUT calls resulted in updated consumer records in the database, as expected.
I'm going to close this bug as NOTABUG because it works as of candlepin 0.7.23