Bug 905210

Summary: Unable to Retrieve Alert Count
Product: [Other] RHQ Project Reporter: Fernando Ribeiro <fernando.ribeiro>
Component: RESTAssignee: Heiko W. Rupp <hrupp>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.5CC: lzoubek
Target Milestone: ---   
Target Release: RHQ 4.6   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-31 06:12:33 EDT Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Fernando Ribeiro 2013-01-28 15:57:33 EST
Description of problem:

All attempts to retrieve the "alert/count" resource in the "application/xml" format fail with the following message:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rhqErrorWrapper>
  <message>Could not find MessageBodyWriter for response object of type: java.lang.Integer of media type: application/xml</message>
</rhqErrorWrapper>

No problems when using the "application/json" or "text/plain" formats.

Version-Release number of selected component (if applicable):

4.5.1

How reproducible:

Steps to Reproduce:
1. Set the "Accept" header to "application/xml"
2. Retrieve the "alert/count" resource
3. Investigate stack trace
  
Actual results:

The error message mentioned in the description.

Expected results:

A proper response.

Additional info:

None
Comment 1 Heiko W. Rupp 2013-02-04 03:51:10 EST
In the past this method was only sending a single number, which was not valid for XML.
This has now been changed into

<value value="..."/>

Similar for the StringValue type

master 564ac02d1aa2c
Comment 2 Fernando Ribeiro 2013-02-04 10:58:34 EST
Great, thanks!
Comment 3 Heiko W. Rupp 2013-02-07 04:35:38 EST
*** Bug 906158 has been marked as a duplicate of this bug. ***
Comment 4 Heiko W. Rupp 2013-08-31 06:12:33 EDT
Bulk close of old bugs in VERIFIED state.