Uploaded image for project: 'CloudStack'
  1. CloudStack
  2. CLOUDSTACK-9258

listDomains API fails with NPE when getVolumeTotal is null

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 4.7.1
    • Fix Version/s: None
    • Component/s: API
    • Security Level: Public (Anyone can view this level - this is the default.)
    • Labels:
      None

      Description

      One of my Domain failed to delete recently and we noticed a bad side-effects with the listDomains API.

      It fails with the following NPE:

      2016-01-28 13:29:54,206 ERROR [com.cloud.api.ApiServer] (catalina-exec-23:ctx-e5e58a26 ctx-71c806be) unhandled exception executing api command: [Ljava.lang.String;@5c34e27
      java.lang.NullPointerException
          at com.cloud.api.query.dao.DomainJoinDaoImpl.setResourceLimits(DomainJoinDaoImpl.java:113)
          at com.cloud.api.query.dao.DomainJoinDaoImpl.newDomainResponse(DomainJoinDaoImpl.java:76)
      

      The problem is caused by a missing null check in combination with auto-boxing. Only the volumeTotal count is affected.
      https://github.com/apache/cloudstack/blob/master/server/src/com/cloud/api/query/dao/DomainJoinDaoImpl.java#L113

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              simongodard Simon Godard
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: