Description of problem: When trying to define 2 alert definitions on a single resource, the second and further attempts fail with a message: Attempt to deserialize an object of type class org.rhq.core.domain.alert.AlertCondition when an object of type class org.rhq.core.domain.alert.AlertDefinition is expected Version-Release number of selected component (if applicable): 4.10.0-SNAPSHOT How reproducible: always Steps to Reproduce: 1. Go to one of the storage node resources 2. Define an alert def (in my case name "test", condition "resource config change"), hit save. 3. Once the alert def is created, try to create second one with the same params. Actual results: Error as described Expected results: No errors Additional info:
This bug is caused by an issue in GWT 2.5.0 (http://code.google.com/p/google-web-toolkit/issues/detail?id=7628). It is fixed in 2.6.0-rc3 and higher.
for the record, this also manifests itself in other ways. for example: 1) execute an operation on a resource (say view the process list on a platform). It works. 2) Go create an alert definition on the resource. 3) Now go execute the operation again. You get the error reported in this BZ
*** Bug 1099621 has been marked as a duplicate of this bug. ***
It seems to happen anytime we send a Resource to the server with the new alertDef attached.
this guy fixes the issue in GWT https://gwt.googlesource.com/gwt/+/4631b356ede41148b726f6014803a249dbc8df4b Now I need to figure out how to use own ServerSerializationStreamReader with his change.
branch: master link: https://github.com/rhq-project/rhq/commit/522860a34 time: 2014-07-16 19:53:12 +0200 commit: 522860a34ba71f3164cea32d03daf1fa1ea93f32 author: Jirka Kremser - jkremser message: [BZ 1058318] - Unable to create 2 alert defs in a row - gwt serialization error - Simplifying the objects that are sent over the wire not to cause troubles with the GWT2.5.0 serialization bug. Fixed for creating/updating alerts, invoking operation or group and resource. Also for alert templates. It might be possible that I miss some scenario, because it is hard to find in code when it will be failing. Upgrading GWT to 2.6 would be safer.
Just a note: it is not possible to use own implementation of AbstractSerializationStreamReader without compiling the GWT source code.