Return-Path: X-Original-To: apmail-cloudstack-issues-archive@www.apache.org Delivered-To: apmail-cloudstack-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3F02A10A22 for ; Mon, 1 Dec 2014 12:36:13 +0000 (UTC) Received: (qmail 83341 invoked by uid 500); 1 Dec 2014 12:36:13 -0000 Delivered-To: apmail-cloudstack-issues-archive@cloudstack.apache.org Received: (qmail 83313 invoked by uid 500); 1 Dec 2014 12:36:13 -0000 Mailing-List: contact issues-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list issues@cloudstack.apache.org Received: (qmail 83304 invoked by uid 500); 1 Dec 2014 12:36:13 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 83301 invoked by uid 99); 1 Dec 2014 12:36:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Dec 2014 12:36:13 +0000 Date: Mon, 1 Dec 2014 12:36:13 +0000 (UTC) From: "Rohit Yadav (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-6945) Null pointer exception when starting a VM that had its template deleted MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CLOUDSTACK-6945?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId= =3D14229728#comment-14229728 ]=20 Rohit Yadav commented on CLOUDSTACK-6945: ----------------------------------------- Thanks Wei! I've cherry-picked it to 4.5 as well and checked that the fix i= s already in 4.3 and 4.4 branches. > Null pointer exception when starting a VM that had its template deleted > ----------------------------------------------------------------------- > > Key: CLOUDSTACK-6945 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-694= 5 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the defa= ult.)=20 > Components: Management Server > Affects Versions: 4.3.0 > Environment: Hosts are Debian 7.4.0 with Xen hypervisor e Xen Clo= ud Platform packages installed and properly configured. > Reporter: Rafael Weingartner > Priority: Critical > Fix For: 4.5.0, 4.4.3, 4.3.2 > > > It seems that you have a bug in CS 4.3.0(and probably previous versions?)= when starting a machine that was created from a template that has been del= eted. > There will happen a null pointer exception in "com.cloud.vm.VirtualMachin= eManagerImpl.orchestrateStart": > =E2=80=9C858 - if (volTemplateId !=3D null && volTemplateId.longVa= lue() !=3D template.getId())=E2=80=9D > The object, =E2=80=9Ctemplate=E2=80=9D is going to be null, because in: > =E2=80=9C811 - VirtualMachineTemplate template =3D _entityMgr.findById(V= irtualMachineTemplate.class, vm.getTemplateId());=E2=80=9D > The findById, will add a where clause, looking for template that have the= column removed that is null, therefore It will return a null object. -- This message was sent by Atlassian JIRA (v6.3.4#6332)