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
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f424a04b Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f424a04b Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f424a04b Branch: refs/heads/master Commit: f424a04b0c37ef8f41363a07f7f43f9341eab9a0 Parents: 8d27c19 Author: Nitin Mehta <nitin.me...@citrix.com> Authored: Wed Aug 6 18:06:33 2014 -0700 Committer: Nitin Mehta <nitin.me...@citrix.com> Committed: Wed Aug 6 18:06:33 2014 -0700 ---------------------------------------------------------------------- server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f424a04b/server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java b/server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java index b4124de..8984ff5 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;