0 Replies Latest reply on May 8, 2018 7:57 AM by tybalt

    Instantiate vApp error: Internal Server Error 500: NullPointerException

    tybalt Lurker

      I am trying to deploy vApp from template but receiving Internal Server 500. I have gone throught the programming guide and checked the infrormation in my xml data several times. I can deploy the vAPP fine from the UI using the same parameters. From stack trace it looks like it gets a Null reference exception when it is trying to get the nework. As mentioned I am able to deploy to this network from the UI

      I am running out of ideas, any help would be much appreciated.

       

      XML

      <?xml version="1.0" encoding="UTF-8"?>

      <InstantiateVAppTemplateParams xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" name="vAPP Test Deploy" deploy="true" powerOn="false">    <Description> Test deploy via REST </Description>

          <InstantiationParams>

              <NetworkConfigSection>

              <ovf:Info> Configuration parameters for logical networks </ovf:Info>

                  <NetworkConfig

                      networkName="vApp2218">

                      <Configuration>

                      <ParentNetwork

                          href="https://vcd/api/admin/network/12345" />

                      <FenceMode>bridged</FenceMode>

                      </Configuration>

                  </NetworkConfig>

               </NetworkConfigSection>

          </InstantiationParams>

          <Source href="https://vcd/api/vAppTemplate/vappTemplate-12345" id="urn:vcloud:vapptemplate:12345" type="application/vnd.vmware.vcloud.vAppTemplate+xml" name="Source vApp Template"/>

      </InstantiateVAppTemplateParams>

      Top of the stack trace:

      <?xml version="1.0" encoding="UTF-8"?>

      <Error xmlns="http://www.vmware.com/vcloud/v1.5" stackTrace="java.lang.NullPointerException

      at com.vmware.vcloud.dl.net.orgvdcnetwork.impl.OrgVdcNetworkManagerImpl.getNetworkByLrId(OrgVdcNetworkManagerImpl.java:1496)

      at com.vmware.vcloud.vdc.impl.ResourceEntityLifeCycleImpl.getParentNetwork(ResourceEntityLifeCycleImpl.java:1886)

      at com.vmware.vcloud.vdc.impl.ResourceEntityLifeCycleImpl.renameDirectConnectedVappNetworks(ResourceEntityLifeCycleImpl.java:1848)

      at com.vmware.vcloud.vdc.impl.ResourceEntityLifeCycleImpl.instantiateVApp(ResourceEntityLifeCycleImpl.java:1211)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:606)

       

      Error

      " minorErrorCode="INTERNAL_SERVER_ERROR" message="[ 1234] class java.lang.NullPointerException" majorErrorCode="500" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://vdc/api/v1.5/schema/master.xsd"></Error>

      <?xml version="1.0" encoding="UTF-8"?>
      <Error xmlns="http://www.vmware.com/vcloud/v1.5" stackTrace="java.lang.NullPointerException
      at com.vmware.vcloud.dl.net.orgvdcnetwork.impl.OrgVdcNetworkManagerImpl.getNetworkByLrId(OrgVdcNetworkManagerImpl.java:1496)
      at com.vmware.vcloud.vdc.impl.ResourceEntityLifeCycleImpl.getParentNetwork(ResourceEntityLifeCycleImpl.java:1886)
      at com.vmware.vcloud.vdc.impl.ResourceEntityLifeCycleImpl.renameDirectConnectedVappNetworks(ResourceEntityLifeCycleImpl.java:1848)
      at com.vmware.vcloud.vdc.impl.ResourceEntityLifeCycleImpl.instantiateVApp(ResourceEntityLifeCycleImpl.java:1211)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)