[
https://issues.apache.org/jira/browse/CLOUDSTACK-7309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14094297#comment-14094297
]
Simon Godard commented on CLOUDSTACK-7309:
------------------------------------------
Thanks Daniel !
> NPE when project was already deleted
> ------------------------------------
>
> Key: CLOUDSTACK-7309
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7309
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: Usage
> Affects Versions: 4.3.0, 4.4.0, 4.3.1
> Reporter: Daniel Vega Simoes
>
> When listing usage records for running VMs and project to which this VM
> belonged was removed, a Null Pointer Exception happens at the time of
> building an usage response. Steps to reproduce the error:
> 1 - create a new project
> 2 - create a new VM under this project
> 3 - remove the project (which also removes the VM)
> 4 - collect usage data (usually happens overnight automatically)
> 5 - list usage records by issuing following command on Cloudmonkey (make sure
> the date range comprises the project removal event)
> list usagerecords startdate=2014-08-05 enddate=2014-08-08 type=1
> Bug happens at the ApiResponseHelper.java file. Whenever account type is
> ACCOUNT_TYPE_PROJECT, it tries to retrieve the Project object, which returns
> null when project was removed.
--
This message was sent by Atlassian JIRA
(v6.2#6252)