VMware Cloud Community
mag2sub
Contributor
Contributor
Jump to solution

Unable to create object : _vCACCAFEEntitiesFinder

Trying to getbusiness groups from  a given vCac host  and using the _vCACCAFEEntitiesFinder  getbusinessgroups method...but the workflow  runs into error



Unable to create object : _vCACCAFEEntitiesFinder : Class ch.dunes.vso.sdk.DynamicWrapper can not access a member of class com.vmware.o11n.plugin.vcac.model.inventory.EntitiesFinder with modifiers "private"


How can we resolve the above error ?

Reply
0 Kudos
1 Solution

Accepted Solutions
iiliev
VMware Employee
VMware Employee
Jump to solution

Hi,

It seems you are trying to instantiate a new instance of vCACCAFEEntitiesFinder class using a code like the following:

var host = ...; // vCAC host object

var ef = new vCACCAFEEntitiesFinder(); // instantiate vCACCAFEEntitiesFinder

var groups = ef.getBusinessGroups(host); // retrieve business groups

You cannot do that; vCACCAFEEntitiesFinder is a scripting singleton and cannot be instantiated. You should use its name directly as in the following code:

var host = ...; // vCAC host object

var groups = vCACCAFEEntitiesFinder.getBusinessGroups(host); // retrieve business groups

View solution in original post

Reply
0 Kudos
3 Replies
iiliev
VMware Employee
VMware Employee
Jump to solution

Hi,

It seems you are trying to instantiate a new instance of vCACCAFEEntitiesFinder class using a code like the following:

var host = ...; // vCAC host object

var ef = new vCACCAFEEntitiesFinder(); // instantiate vCACCAFEEntitiesFinder

var groups = ef.getBusinessGroups(host); // retrieve business groups

You cannot do that; vCACCAFEEntitiesFinder is a scripting singleton and cannot be instantiated. You should use its name directly as in the following code:

var host = ...; // vCAC host object

var groups = vCACCAFEEntitiesFinder.getBusinessGroups(host); // retrieve business groups

Reply
0 Kudos
mag2sub
Contributor
Contributor
Jump to solution

Thanks for that response...let me give that a try and revert!

Reply
0 Kudos
mag2sub
Contributor
Contributor
Jump to solution

It works...I had run  into some other issue but this issue resolved..

Im trying to get this into a property definition with external script ...any pointers ?

Thanks

Reply
0 Kudos