From f424a04b0c37ef8f41363a07f7f43f9341eab9a0 Mon Sep 17 00:00:00 2001 From: Nitin Mehta Date: Wed, 6 Aug 2014 18:06:33 -0700 Subject: [PATCH] CLOUDSTACK-7272: Router stop fails with NPE. Fixing it by making the hostId as Long object than native type long. The issue was the response was checking for getHostId() != null to populate attribute hypervisor. But since the hostId is declared as long it will never be null, resulting in the NPE when populating hypervisor. Fixed that --- server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java b/server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java index b4124ded58a..8984ff518ed 100644 --- a/server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java +++ b/server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java @@ -119,7 +119,7 @@ public class DomainRouterJoinVO extends BaseViewVO implements ControlledViewEnti private String ip6Dns2 = null; @Column(name = "host_id", updatable = true, nullable = true) - private long hostId; + private Long hostId; @Column(name = "host_uuid") private String hostUuid;