Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 168455

Re: Trying to Update vCAC Blueprint Entity, gets "java.lang.NullPointerException"

$
0
0

Can you tell us what line and script element the NullPoint Exception is thrown in the Update entity workflow? that would help since we can't know what params you're submitting and if they're correct.

 

Can you try if this works?

 

var properties = new Properties();
var links = new Properties();
vCACEntityManager.updateModelEntityBySerializedKey(theBlueprintEntity.hostId, theBlueprintEntity.modelName, theBlueprintEntity.entitySetName, theBlueprintEntity.keyString, properties, links, null);

 

P.S.: headers may be null, no worries. That's not the issue.

 

BTW: theBlueprintEntity.getEntity() should work just fine to get the vCAC:Entity object if you already have the vCAC:Blueprint object. After using that method you should always test if it's not null. What I usually do is something like this:

 

var entity = myBlueprint.getEntity();
if(entity)
{     //do what you like with your entity object
}
else
{     throw("Error: unable to find entity object!");
}

 

 

Cheers,

Robert


Viewing all articles
Browse latest Browse all 168455

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>