last week, we merged a patch that upgrades oVirt UI technology stack to use the latest
version of Google Web Toolkit SDK and related modules . This patch includes all
"essential" upgrade changes as described in .
After merging the above mentioned patch, we faced some issues related to GWT RPC
serialization, involving classes shared between frontend and backend. Please read on to
learn more about these issues and ways to fix them.
(A) NullPointerException at server-side (GWT RPC servlet) when serializing backend
business entity into RPC response payload
* exception in server.log -> Exception while dispatching incoming RPC call:
* error dialog in web UI with status code 500 (internal server error)
* fields such as "private X field = Y;" of the given entity are not included in
GWT RPC serialization policy
* this happens when entity constructor isn't referenced in UI code -> GWT compiler
marks the constructor and instance initializer as dead code
* since instance initializer takes care of adding such fields to given type (entity) in
* for each field such as "private X field = Y;"
1, change field declaration to "private X field;"
2, add "field = Y;" statement to constructor
* even though constructor and instance initializer are marked as dead code, fields such as
"private X field;" are still added to given type (entity) in generated
statement such as "private X field;" are always added, whereas fields with
initialization statement such as "private X field = Y;" are added via instance
initializer (which might be removed if it's marked as dead code)
* patch [http://gerrit.ovirt.org/#/c/17352/
] for RepoImage entity
(B) Instance field(s) with null values at server-side after deserializing RPC request
* object passed from client contains field(s) with null values, despite client
initializing fields before making RPC call
* client uses RPC method signature that works with type A, i.e. VdcActionParametersBase
* type A meets GWT RPC serialization rules, as defined in  section "Serializable
* client uses type B (extends A) when calling given RPC method at runtime, i.e.
* type B does NOT meet GWT RPC serialization rules, i.e. missing no-arg constructor
* back at server-side, GWT RPC servlet fails to deserialize type B properly
* ensure all types participating in GWT RPC communication meet GWT RPC serialization
1, assignable to IsSerializable or Serializable interface
2, all non-final & non-transient instance fields meet GWT RPC serialization rules
3, contains no-arg constructor (in order to create instance during deserialization)
* patch [http://gerrit.ovirt.org/#/c/17368/
] for Gluster Parameter classes