Eli Mesika has uploaded a new change for review. Change subject: core:Class cast exception when fence fails ......................................................................
core:Class cast exception when fence fails The problem was that in the case that the proxy host is blocked by iptables to access the PM card we got a message result in the RPC XML return value which is Object[]. In tyhe code, there was attempt to cast this result to a string which obviously failed with ClassCastException. This patch adds check for the message type and gets it properly as string in the case that we got Object[]. Change-Id: I511599ce3c6dbf313cbe8d1f0f57e329a4aa1d79 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1114977 Signed-off-by: Eli Mesika <[email protected]> --- M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/StatusForXmlRpc.java 1 file changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/67/30567/1 diff --git a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/StatusForXmlRpc.java b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/StatusForXmlRpc.java index 2a41224..d866481 100644 --- a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/StatusForXmlRpc.java +++ b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/StatusForXmlRpc.java @@ -1,5 +1,6 @@ package org.ovirt.engine.core.vdsbroker.vdsbroker; +import java.util.Arrays; import java.util.Map; public class StatusForXmlRpc { @@ -12,7 +13,12 @@ public StatusForXmlRpc(Map<String, Object> innerMap) { mCode = (Integer) innerMap.get(CODE); - mMessage = (String) innerMap.get(MESSAGE); + if (innerMap.get(MESSAGE) instanceof Object[]) { + mMessage = Arrays.toString((Object[])innerMap.get(MESSAGE)); + } + else { + mMessage = innerMap.get(MESSAGE).toString(); + } } public StatusForXmlRpc() { -- To view, visit http://gerrit.ovirt.org/30567 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I511599ce3c6dbf313cbe8d1f0f57e329a4aa1d79 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Eli Mesika <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
