Juan Hernandez has uploaded a new change for review. Change subject: frontend: Better message when using old GUI ......................................................................
frontend: Better message when using old GUI When application is updated but an user still has the old GUI (user portal or webadmin) loaded in the browser the following message will appear in the log: Exception while dispatching incoming RPC call: com.google.gwt.user.client.rpc.SerializationException: Could not find ClientOracle data for permutation DA478849974581CCAF06E5E18D613907 This is not very friendly for the administrator looking at the log file. This patch replaces that message with something that is hopefully more useful for the administrator, something like this: Exception while dispatching incoming RPC call: com.google.gwt.user.client.rpc.SerializationException: Can't find the serialization policy file. This probably means that the user has an old version of the application loaded in the browser. To solve the issue the user needs to close the browser and open it again, so that the application is reloaded. Change-Id: Id58f425d2745fdcba4bdfa8fa66a61e7e6e72d00 Bug-Url: https://bugzilla.redhat.com/909904 Signed-off-by: Juan Hernandez <[email protected]> --- M frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/GenericApiGWTServiceImpl.java 1 file changed, 24 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/46/13046/1 diff --git a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/GenericApiGWTServiceImpl.java b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/GenericApiGWTServiceImpl.java index 62c58e1..3fd6dfe 100644 --- a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/GenericApiGWTServiceImpl.java +++ b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/GenericApiGWTServiceImpl.java @@ -21,6 +21,8 @@ import org.ovirt.engine.core.common.users.VdcUser; import org.ovirt.engine.ui.frontend.gwtservices.GenericApiGWTService; +import com.google.gwt.user.client.rpc.SerializationException; + public class GenericApiGWTServiceImpl extends AbstractGWTServiceImpl implements GenericApiGWTService { private static final long serialVersionUID = 7395780289048030855L; @@ -172,4 +174,26 @@ return session.getId(); } + @Override + protected void doUnexpectedFailure (Throwable error) { + // If the user is using a version of the application different to what + // the server expects the names of the RPC serialization policy files + // will not match, and in that case GWT just sends the exception to the + // log, which is not very user or admin friendly, so we replace that + // with a more friendly message: + if (error instanceof SerializationException) { + error = new SerializationException( + "Can't find the serialization policy file. " + //$NON-NLS-1$ + "This probably means that the user has an old " + //$NON-NLS-1$ + "version of the application loaded in the " + //$NON-NLS-1$ + "browser. To solve the issue the user needs " + //$NON-NLS-1$ + "to close the browser and open it again, so " + //$NON-NLS-1$ + "that the application is reloaded.", //$NON-NLS-1$ + error + ); + } + + // Now that we replaced the message let GWT do what it uses to do: + super.doUnexpectedFailure(error); + } } -- To view, visit http://gerrit.ovirt.org/13046 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id58f425d2745fdcba4bdfa8fa66a61e7e6e72d00 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Juan Hernandez <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
