Bug 541486 - Fields in configuration update objects are not getting serialized
Summary: Fields in configuration update objects are not getting serialized
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Configuration
Version: 1.4
Hardware: All
OS: Linux
high
medium
Target Milestone: ---
: ---
Assignee: Simeon Pinder
QA Contact: Corey Welton
URL:
Whiteboard:
Depends On:
Blocks: JON231
TreeView+ depends on / blocked
 
Reported: 2009-11-26 02:23 UTC by John Sanda
Modified: 2010-08-12 16:49 UTC (History)
2 users (show)

Fixed In Version: 2.4
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-08-12 16:49:32 UTC
Embargoed:


Attachments (Terms of Use)

Description John Sanda 2009-11-26 02:23:27 UTC
Description of problem:
The classes ResourceConfigurationUpdate, PluginConfigurationUpdate, GroupResourceConfigurationUpdate, and GroupPluginConfigurationUpdate inherit several fields from an ancestor class, AbstractConfigurationUpdate. Those fields include,

* AbstractConfigurationUpdate.configuration
* AbstractConfigurationUpdate.errorMessage
* AbstractConfigurationUpdate.subjectName
* AbstractConfigurationUpdate.createdTime
* AbstractConfigurationUpdate.modifiedTime

Because AbstracConfigurationUpdate is not Serializable, these fields do not get serialized. I first came across in the CLI when calling ConfigurationManagerRemote.getLatestResourceConfigurationUpdate() and saw that the configuration field in the returned ResourceConfigurationUpdate object was null.


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


How reproducible:


Steps to Reproduce:
1. Log into the CLI
2. Call ConfigurationManager.getLatestResourceConfigurationUpdate() for a resource having some configuration
3. If necessary, verify in the database or in the web UI that a configuration exists for the resource.
4. For the returned ResourceConfigurationUpdate object r, execute (in the CLI) print(r.configuration)
  
Actual results:
print(r.configuration) results in 'null'

Expected results:
Expect to see a Configuration object printed

Additional info:

Comment 1 John Sanda 2009-11-26 03:29:08 UTC
I have committed a fix to the raw-config branch which includes unit tests for all implementing classes of AbstractConfigurationUpdate to verify the correct serialization behavior.

The commit hash is 4743488a8b743afb2965cb9a242b5dc8c7fb37cd

Comment 2 Charles Crouch 2009-11-30 15:47:44 UTC
Updated to include 1.3.1 and 1.4 as targets. This needs to be triaged for 1.3.1

Comment 3 Simeon Pinder 2010-01-07 14:25:46 UTC
Merged 541486 (Fields in configuration update objects are not getting serialized) from git fix(4743488a8b743afb2965cb9a242b5dc8c7fb37cd) to CP branch for 1.3.1.

Svn commit (5271)

Comment 4 Corey Welton 2010-01-23 00:12:22 UTC
QA Verified.


rhqadmin@localhost:7080$ r = ConfigurationManager.getLatestResourceConfigurationUpdate(10005)
ResourceConfigurationUpdate:
	resource: Resource[id=10005, type=Postgres Server, key=jdbc:postgresql://127.0.0.1:5432/postgres, name=Postgres [postgres], version=8.2.11]

rhqadmin@localhost:7080$ print(r.configuration) 
Configuration[id=13151, notes=null]

Comment 5 Corey Welton 2010-08-12 16:49:32 UTC
Mass-closure of verified bugs against JON.


Note You need to log in before you can comment on or make changes to this bug.